×

Discussion Board

Results 1 to 9 of 9

Threaded View

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    33

    how to change the color of the Highlight item in the listbox

    Hi All,
    Iam unable to change the color of the highlight rectangle over the item in the listbox. iam using the listbox type is CAknColumnListBox. The default color is light blue. i want to change it orange color. the code i wrote for it is shown here. iam working on S60 3ed FP1 sdk verstion. any suggestions please??

    m_iListBox = new (ELeave) CAknSingleGraphicStyleListBox();
    m_iListBox->ConstructL (this, EAknListBoxSelectionList);
    m_iListBox->SetContainerWindowL (*this);
    m_iListBox->SetListBoxObserver(this);
    m_iListBox->SetObserver(this);

    m_iListBox->CreateScrollBarFrameL(ETrue);
    m_iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto );
    m_iListBox->SetFocus(ETrue);

    m_iListBox->View()->SetBackColor(TRgb(0,0,0));
    m_iListBox->View()->ItemDrawer()->SetBackColor(TRgb(0,0,0));
    m_iListBox->ItemDrawer()->SetHighlightedBackColor(TRgb(200,140,20));//orange

    //m_iListBox->ItemDrawer()->SetBackColor(TRgb(0,0,0));
    //m_iListBox->ItemDrawer()->SetHighlightedBackColor(TRgb(200,140,20));
    m_iListBox->ItemDrawer()->ColumnData()->SetColumnFontL(1,CEikonEnv::Static()->AnnotationFont());

    m_iListBox->View()->ItemDrawer()->SetTextColor (TRgb(200,140,20));
    InitListBox();

    SetRect( aRect );
    ActivateL();

    thanks in advance..

    -ravi
    Last edited by RaveendraB; 2007-10-05 at 06:08. Reason: change the description more clearly.

Similar Threads

  1. How to open a Container from a ListBox Item?
    By jennie in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-09-11, 07:37
  2. Cannot read from listbox item array
    By Acemaker in forum Symbian
    Replies: 6
    Last Post: 2007-07-14, 17:43
  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. How to Highlight item in ListBox.........
    By platinnum in forum Symbian
    Replies: 1
    Last Post: 2005-05-19, 14:25
  5. Change color of listbox item
    By anoopd in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-03-09, 08:33

Posting Permissions

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