how to change the color of Highlight rectangle in the listbox

Login to reply to this topic.
Thu, 2007-10-04 13:31
Joined: 2007-08-13
Forum posts: 4

Hi All,
I have listbox with some items. Iam unable to change the color of highlight rectangle 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(KRgbRed);


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


Thu, 2007-11-22 11:25
Joined: 2007-06-21
Forum posts: 46
Re: how to change the color of Highlight rectangle in the listbo

hi

i don't know whether this will help or not, try this function of CCoeControl "OverrideColorL"

if you changed the color let me know...

Regards
Sri.............

  • Login to reply to this topic.