Board index » delphi » Change Highlight color in a list box?

Change Highlight color in a list box?

Just was wondering if anyone could point me in the right direction to
change the color of the selected item in a list box? You know the
selected item takes the default color of clHighlight, I'd like to change
it to a different color. Any ideas?

Many thanks!

Robert

 

Re:Change Highlight color in a list box?


Robert -

The color is part of the general color scheme that the use has chosen
through Control Panel. You can change the setting for that color or
you can use an owner draw style listbox. The latter is definitely
preferable, since the former will affect all applications. But even
the owner draw style option is "iffy" - you don't know why the user is
using the colors that they are (16 level monochrome display, visual
impairments, etc.) So be real careful about overriding what the user
wants.

Good luck.

Kurt

Other Threads