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

TCustomComboBox.Items

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

Declaration

Source position: stdctrls.pp line 434

public property TCustomComboBox.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

TCustomComboBox.ItemIndex

  

The index of the currently selected item, or -1 if none is selected.

TCustomComboBox.Sorted

  

Determines whether the list entries are sorted in alphanumeric order.

TCustomComboBox.OnGetItems

  

Handler invoked when widgetset items list can be populated.

TCustomComboBox.Text

  

The value in the edit box for the control.

TStrings


Version 3.2 Generated 2024-02-25 Home