Change background as well as foreground color of selected item in listbox
Hello All,
I want to change the background as well as foreground color of selected item in list box
I am doing as follows:
void Ctableview::ConstructL(const TRect& aRect)
{
CreateWindowL();
iItemList = new (ELeave) CAknDoubleLargeStyleListBox();
iItemList->SetContainerWindowL(*this);
iItemList->SetMopParent(this);
iItemList->ConstructL(this);//,EAknListBoxSelectionList);
iItemList->View()->SetBackColor(TRgb(0,0,0));
iItemList->View()->ItemDrawer()->SetBackColor(TRgb(0,0,0));
((CEikFormattedCellListBox*)iItemList)->ItemDrawer()->SetHighlightedBackColor(TRgb(200,140,20));//orange
TInt currentFocusItem = iItemList->View()->CurrentItemIndex();
//GetSelectedItem();
SetRect(aRect);
iItemList->MakeVisible(true);
ActivateL();
}
but nothing happen..
Kindly help me
Thank you.
Re: Change background as well as foreground color of selected item in listbox
Re: Change background as well as foreground color of selected item in listbox
I am able to change the color of text of selected item but i am unable to change background...
AknsUtils::SetAvkonSkinEnabledL(ETrue); /// first disable the skin
((CEikFormattedCellListBox*)iItemList)->ItemDrawer()->SetSkinEnabledL(ETrue);
((CEikFormattedCellListBox*)iItemList)->ItemDrawer()->SetBackColor(KRgbYellow);
((CEikFormattedCellListBox*)iItemList)->ItemDrawer()->SetHighlightedTextColor(KRgbGreen);
I am writing this in Draw()
I dont know how can i do this.
Kindly help me.
Re: Change background as well as foreground color of selected item in listbox
Now I am able to change colour of text of selected item as well as background....
in my list box there is icon, title, and date and time
I want to show them as
icon, title, D/T.
kindly help me.
Re: Change background as well as foreground color of selected item in listbox
Can anyone tell me how to do rowspaning in listbox in symbian???
Re: Change background as well as foreground color of selected item in listbox
In emulator background has been changed but not in my device. Why is it happen???