I have a custom listbox derived from CAknSingleGraphicPopupMenuStyleListBox. I need to set background color for the listbox.
I wrote own item drawer. In DrawActualItem() I just draw the background rectangle with the preferred color and then call base class to do the rest. (CFormattedCellListBoxItemDrawer:rawActualItem() ). Btw, it's necessary to call first iList->ItemDrawer()->FormattedCellData()->SetDrawBackground( EFalse ).
It looks ALMOST ok. The problem is that the each item text looks like it's been drawn twice, with difference of one or two pixels. The effect is a bit like "bold".
And one more thing. I have marquee on. When a too long item is selected, its text suddenly appears perfectly ok. As long as it's selected.
Is there a way to change the background color without writing own itemDrawer? iList->ItemDrawer()->SetBackColor(backColor) seems to have no effect as it's been often pointed out in this forum. Or has someone been able to set the background color with SetBackColor()?