×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Change the default background of a view and listbox

    Hi

    I want to change the background color of a listbox. I am able to change the color of listbox items text but not the list box! Is it possible to change the background color of listbox?

    I have used the following code to change the color of listbox text:

    iListBox->View()->ItemDrawer()->SetHighlightedTextColor(KRgbYellow);
    iListBox->View()->ItemDrawer()->SetTextColor(KRgbRed);

    And tried to use the followings for changing the color of listbox, but didn't succeed...

    //iListBox->OverrideColorL(EColorControlBackground, KRgbGreen );
    //iListBox->View()->ItemDrawer()->SetHighlightedBackColor(KRgbGreen);
    //iListBox->View()->SetBackColor(KRgbRed);
    //iListBox->View()->ItemDrawer()->SetBackColor(KRgbGreen);

    Thanks....

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Change the default background of a view and listbox

    AknsUtils::SetAvkonSkinEnabledL(EFalse); /// first disable the skin

    iListBox->ItemDrawer()->SetBackColor(KRgbDarkGray); /// call this function in DRaw()
    Regards,
    Shafali

Similar Threads

  1. Setting background color of a listbox view.
    By jaigaur in forum Symbian User Interface
    Replies: 9
    Last Post: 2009-06-19, 10:27
  2. Change view but still i have another view in background
    By mariadlangeles in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-12-18, 18:19
  3. Change view when selecting item in listbox
    By ninidotnet in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-04-20, 05:59
  4. Dynamic change background color
    By s2005 in forum Symbian
    Replies: 0
    Last Post: 2005-11-03, 21:37
  5. listbox in multi view / tab problem
    By jmprince80 in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-06-17, 19:41

Posting Permissions

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