Sign in Join
FPDoc Onlineexperiment

TCustomComboBox.Items property

Member of TCustomComboBoxpublicIn unit StdCtrls

The list of items displayed in the combo-box control.

Declaration

pascal
property Items: TStrings read FItems write SetItems;

Description

Items is a TStrings property which contains the strings displayed in the static or drop-down list for the control. Settings a new TStrings value for the property causes the Assign method to be called to load the string values into the current class instance.

As an alternative, use the OnGetItems event handler to dynamically populate the values in Items when the drop-down list for the control is displayed (or created).

String values in Items can be ordered alphabetically by setting the Sorted property to True. This also affects the ordinal position for new values added to Items. Its index will be the position in the sorted order, and not necessarily at the end of the list.

Use ItemIndex to determine the ordinal position in Items with the value displayed the edit box for the control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.