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

# TCustomComboBox.DoEnter

Updates the control when the Enter key is applied.

## Declaration

Source position: stdctrls.pp line 349

`protected procedure TCustomComboBox.DoEnter; override;`

## Description

DoEnter is an overridden method used to update the edit and list box when the Enter or Return key is handled in messages to the control. The inherited method is called to signal the OnEnter event handler (when assigned).

DoEnter uses the value in Style to determine if an edit box is enabled for the control. If an edit box is not used, no additional actions are performed in the method.

When AutoSelect is enabled, the SelectAll method is called to select the text in the edit box and to locate the entry in the Items for the control. AutoSelected is updated to indicate if SelText matches the value in Text.

## See also

TCustomComboBox.AutoSelect |  | Selects the entire content of the edit box when the control receives the focus.
TCustomComboBox.AutoSelected |  | True indicates that the selection was marked automatically by the control.
TCustomComboBox.Items |  | The list of items displayed in the combo-box control.
TCustomComboBox.SelectAll |  | Selects the text content in the edit box for the control.
TCustomComboBox.SelText |  | The selected text in the edit box for the control.
TCustomComboBox.Style |  | Controls the appearance and behavior for the combo-box.
TCustomComboBox.Text |  | The value in the edit box for the control.
TWinControl.DoEnter |  | Signals the OnEnter event handler (when assigned) when the control receives focus.
TWinControl.OnEnter |  | Event handler signalled when the control receives focus.