Vcl.DBCtrls.TDBListBox.KeyPress
Delphi
procedure KeyPress(var Key: Char); override;
C++
DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | Vcl.DBCtrls.pas Vcl.DBCtrls.hpp |
Vcl.DBCtrls | TDBListBox |
Description
Responds when the user presses a key.
Vcl.DBCtrls.TDBListBox.KeyPress inherits from Vcl.StdCtrls.TCustomListBox.KeyPress. All content below this line refers to Vcl.StdCtrls.TCustomListBox.KeyPress.
Responds when the user presses a key.
KeyPress is called automatically when the list box receives a key-press message (WM_CHAR). It generates an OnKeyPress event, and then, if the AutoComplete property is true, updates ItemIndex to reflect the next character that the user typed.
The Key parameter is the character represented by the key that is pressed, not a Windows virtual key code.