TCustomComboBox.KeyUp procedure
Handles AutoComplete and AutoSelect for the control.
Declaration
procedure KeyUp(var Key: Word; Shift: TShiftState); overrideArguments
Key | Virtual key code examined in the method. |
Shift | Shift, Alt, or Ctrl modifier for the key code. |
Description
KeyUp is an overridden method in TCustomComboBox, and calls the
inherited method on entry.
KeyUp ensures that the VK_RETURN key code causes SelectAll
to be called when AutoCompletion or AutoSelect is
enabled for the control. AutoSelected is set to True when
the values in SelText and Text are the same.
In addition, alphanumeric key codes are used to perform AutoComplete text
location using the options enabled in the AutoCompleteText
property. The values in Text, SelStart, and
SelLength are updated (when needed) and the Select
method is called to reflect the operation. If the key causes the
auto-completed text to differ from the value in Text, ItemIndex is updated to
reflect the auto-completed text value.
KeyUp is called when TLMKeyUp control messages are processed in
the handlers for the control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
