[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'StdCtrls' (#lcl)

# TCustomListBox.ItemIndex

Ordinal position for the currently selected item, -1 if none.

## Declaration

Source position: stdctrls.pp line 646

`public property TCustomListBox.ItemIndex : Integer read GetItemIndex write SetItemIndex default - 1;`

## Description

ItemIndex is an Integer property which contains the position for the current selection in the control. If MultiSelect is True, ItemIndex represents the selected item which also has focus. Use the Selected property to access individual items when MultiSelect is enabled.

## See also

TCustomListBox |  | The base class for TListBox.
TCustomListBox.Items |  | The list of all items defined in the control.
TCustomListBox.MultiSelect |  | Allows selection of more than one item from the list.
TCustomListBox.ExtendedSelect |  | True when a contiguous range of items can be selected using Shift+Click. The default value is True.