TFilterComboBox.ItemIndex property
The index of the currently selected item, or -1 if no item is selected.
Declaration
property ItemIndex:;Description
ItemIndex is an
Integer property which contains the
ordinal position in
Items for the current selection in the drop-down
list. The first value in Items is at index position
0 (
zero). The
final value in Items is at the index position
ItemCount
-1.
When no value is selected in the drop-down list, ItemIndex is set to
-1.
The default value for the property is
-1.
When the value for the property is read, the widgetset class is queried if a handle has been assigned for the control.
Assigning a new value to the property causes the value in Text to
be updated to reflect the new selection in the control. When ItemIndex is set
to -1, Text is set to an empty string ('') and the TextHint for the
control is displayed (when assigned).
For platforms which use emulated text hints, the non-native placeholder is displayed or hidden when ItemIndex or Text is changed. -1 causes the value in TextHint to be displayed on the control. Any other value causes the emulated text hint to be hidden. Platforms which support native TextHint placeholders control the hint display in the widget instance.
This description is the one of StdCtrls.TCustomComboBox.ItemIndex.
See also
- Items
- AddItem
- Text
- TextHint
- CanShowEmulatedTextHint
- EmulatedTextHintStatus
- AddHistoryItem
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
