Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    27

    Using skins! Custom Listbox / Custom ListItemDrawer

    I have a custom listbox implementation that extends CEikTextListBox. This listbox uses a custom listitemdrawer that extends CTextListItemDrawer. When this is displayed on the screen the textbox does not use the current skin, instead the text is black and the listbox background is white. I've search around in this forum and I see bits and pieces here and there that are related to my problem but I need a complete solution to this problem. Does anybody have an example that shows ALL of the steps that I would need to take to add skin support to my custom list box?

  2. #2
    Super Contributor
    Join Date
    Jun 2004
    Location
    SymbianLand
    Posts
    763

    Re: Using skins! Custom Listbox / Custom ListItemDrawer

    Quote Originally Posted by akrapacs
    I have a custom listbox implementation that extends CEikTextListBox. This listbox uses a custom listitemdrawer that extends CTextListItemDrawer. When this is displayed on the screen the textbox does not use the current skin, instead the text is black and the listbox background is white. I've search around in this forum and I see bits and pieces here and there that are related to my problem but I need a complete solution to this problem. Does anybody have an example that shows ALL of the steps that I would need to take to add skin support to my custom list box?
    Do the following things to get skin support in your custom control.
    1.Your app ui must have the SkinEnable flag..
    Code:
    void CMyAppUi::ConstructL()
    {
        BaseConstructL(EAknEnableSkin);
    }
    2. Your compound controls(view class derived from CCoeControl and which holds the listbox) draw must be empty.
    3. In the item drawer of your list item do not set any brush colors at all and do a simple drawtext with point and text like this:
    Code:
    	iGc->DrawText(itemText,TPoint(5,textRect.iBr.iY));
    Keeping these things in mind you will get the default skin your list item as well.
    --Mayur.

Similar Threads

  1. skin not displayed in custom listbox....
    By Neelakantan in forum Symbian User Interface
    Replies: 10
    Last Post: 2010-06-20, 09:14
  2. Setting background color for a custom listbox
    By hubbabubba in forum Symbian
    Replies: 2
    Last Post: 2008-06-20, 09:30
  3. problem in Custom Listbox
    By vijay_dasani85 in forum Symbian
    Replies: 2
    Last Post: 2006-10-19, 12:42
  4. big custom listbox
    By ajaykapur in forum Symbian User Interface
    Replies: 4
    Last Post: 2006-07-12, 10:53
  5. Add Listbox background image using skins
    By kamosoft in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-02-27, 16:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×