Change selected item/s selected colour

For questions and postings not covered by the other forums
mike.day
Posts: 10
Joined: Tue Oct 01, 2013 8:19 am

Change selected item/s selected colour

Postby mike.day » Mon Oct 07, 2013 10:34 am

Does anyone know how to change the selected item/s selected colour for listboxes and combos without affecting the listIndex and itemSelected properties?

mjagers
Posts: 17
Joined: Wed Sep 22, 2010 5:22 pm

Re: Change selected item/s selected colour

Postby mjagers » Fri Nov 03, 2017 8:14 am

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.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests

cron