From RAD Studio API Documentation
Jump to: navigation, search


property Selected[Index: Integer]: Boolean read GetSelected write SetSelected;


__property bool Selected[int Index] = {read=GetSelected, write=SetSelected};


Type Visibility Source Unit Parent
property public
Vcl.StdCtrls TCustomListBox


Indicates whether a particular item is selected.

Use Selected to query the state of a particular item in the list box. If the item specified by the Index parameter is selected in the list box, the value of the Selected property is true. If the specified item is not selected, Selected is false. Set Selected to change the currently selected item.

The Index parameter is the item referenced by its position in the list box, with the first item having an Index value of 0.

An item is selected when the user highlights it. More than one item in the list box can be selected by setting the MultiSelect property to true. In this case, the Selected item is the one that has focus when the list box has input focus.

See Also

Code Examples