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

# TCustomComboBox.ClearSelection

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

## Declaration

Source position: stdctrls.pp line 418

`public procedure TCustomComboBox.ClearSelection;`

## Description

ClearSelection is a procedure used to remove the current item selection in the list box for the control. This causes the value in ItemIndex to be changed to -1, and the value in Text is set to an empty string ('').

Use SelStart, SelLength, and SelText to access or modify the text selection in the edit control. Set SelLength to zero (0) to remove the text selection in the edit box.

## See also

TCustomComboBox.ItemIndex |  | The index of the currently selected item, or -1 if no item is selected.
TCustomComboBox.SelLength |  | The number of selected UTF-8 characters in the edit box.
TCustomComboBox.SelStart |  | zero-based index to the UTF-8 character at the beginning of the selected text in the edit box.
TCustomComboBox.SelText |  | The selected text in the edit box for the control.