Page 1 of 1

Change selected item/s selected colour

Posted: Mon Oct 07, 2013 10:34 am
by mike.day
Does anyone know how to change the selected item/s selected colour for listboxes and combos without affecting the listIndex and itemSelected properties?

Re: Change selected item/s selected colour

Posted: Fri Nov 03, 2017 8:14 am
by mjagers
If the listbox item is clicked then the listIndex is set and listbox.itemSelected[listbox.listIndex] will be true.

And setting the foreColor / backColor is as simple as:
listbox.itemForeColor[listbox.listIndex] := <fore color>
listbox.itemBackColor[listbox.listIndex] := <back color>

Combobox should be similar.