We help IT Professionals succeed at work.

Listbox Itemindex and Selected Listbox Item

skynergy
skynergy asked
on
Medium Priority
4,488 Views
Last Modified: 2008-01-09
I am using a Delphi 5 TListBox. When I have a couple of Listbox Items and set the ItemIndex at run time to a valid item then you can see a grey selection box around the item. How can I however get the blue selection box appear around that item? So in other words if I use my mouse and select one item it has a blue selection box around the item. I want to do this at run time.

Thanx
Magnus
Comment
Watch Question

Commented:
It works fine here, just make sure that MultiSelect is false

Motaz

Commented:
If you need multiselect to be enabled, then I beleive, you could use ListBox.Selected[Index] := TRUE / FALSE

Regards
//raidos