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

TDBLookupListBox.KeyDown

Applies the specified virtual key code to the control.

Declaration

Source position: dbctrls.pp line 487

protected procedure TDBLookupListBox.KeyDown(

  var Key: Word;

  Shift: TShiftState

); override;

Arguments

Key

  

Virtual key code examined in the method.

Shift

  

Modifier for the virtual key code.

Description

KeyDown is an overridden procedure used to apply the specified virtual key code and modifier to the control.

Key is the virtual key code examined in the method. Shift is the modifier for the virtual key code.

KeyDown ensures that the NullValueKey shortcut defined for the control is applied to the control and its lookup dataset in the internal TDBLookup instance. This causes the value in ItemIndex to be set to -1 to clear the selection in the listbox.

KeyDown calls the inherited method prior to exit.

See also

TDBLookupListBox.NullValueKey

  

Keyboard shortcut used to assign the empty key value to the control.

TDataLink.Active

TCustomListBox.ItemIndex

  

Ordinal position for the currently selected item, -1 if none.


Version 4.0 Generated 2025-05-03 Home