The use of skin in Symbian is one of the things that makes me so novice. Toss a day, put a few cases have been tested, summed up it.
1. The method of a sentence
The most basic trick is to add a sentence to the Constructl () in the appui. As follows:
void Ctestmimappui::constructl () {
Baseconstructl
(Caknappui::eaknenableskin);
Add your code here ...
}
Using the above sentence basically makes most of the control transparent, showing the system's skin.
However, sometimes we find that some of the controls (such as that Ceikedwin) still show an unsightly white background, at which point we need to do some extra work.
Modify the container header file to add a member variable:
caknsbasicbackgroundcontrolcontext* Ibgcontext;
It then initializes it in the corresponding Constructl function:
Ibgcontext = Caknsbasicbackgroundcontrolcontext::newl
(kaknsiidqsnbgareamainidle,arect,etrue);
Here's the kaknsiidqsbgareamainidle you can choose other, not to be in the way.
Then, because Ceidedwin has a handy member method SETSKINBACKGROUNDCONTROLCONTEXTL, the next code is simple:
Iedwin=new (Eleave) Ceikedwin;
Cleanupstack::P USHL (Iedwin);
Iedwin->constructl
();
IEDWIN->SETSKINBACKGROUNDCONTROLCONTEXTL (Ibgcontext);
Iedwin->setextenttowholescreen ();
Iedwin->setfocus
(etrue);
Iedwin->activatel ();
Cleanupstack::P op
(iedwin);
That's it. Don't forget to delete it at the time of the destructor.