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

TCustomComboBox.Clear

Removes all items from the list, and clears the edit box.

Declaration

Source position: stdctrls.pp line 416

public procedure TCustomComboBox.Clear; virtual;

Description

Clear is a procedure used to remove all values stored in the Items property for the control. Clear calls the Clear method in Items to removed the strings and any associated objects stored in the TStrings property. Clear sets the value in Text to an empty string ('') which forces the value in ItemIndex to be changed to -1.

Use the Clear method in Items to remove all of the the values stored in Items but keep the current value in Text.

Use ClearSelection to reset the value in ItemIndex and de-select the selected value in Items.

See also

TCustomComboBox.Items

  

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

TCustomComboBox.Items

  

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

TCustomComboBox.ItemIndex

  

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

TCustomComboBox.ClearSelection

  

Removes the item selection in the list box for the control.

TStrings.Clear


Version 3.2 Generated 2024-02-25 Home