Search Engine

Sunday, May 23, 2010

How to hide the highlight of a listbox

It is sometimes useful (not very often, I agree) to hide the highlight of a listbox. And this was actually my case this morning. After a bit of googling, I did not find anything about this particular problem. So I had to dig a bit into the Symbian SDL and finally found that I could achieve that through the CListItemDrawer class.

To disable the highlight (and thus don't see the currently selected item), you have to set the EDisableHighlight flag of the drawer. This can be done with the following call:


And if you want to enable it at a later stage, just clear it:


Note that the SetFlags / ClearFlags primitive just apply on the flag you pass has a parameter. So you just don't need to burden with the value of the other flags as it will stay unchanged.


Post a Comment