Symbian Learning Notes (22)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.