Vcl.ComCtrls.TCustomComboBoxEx.KeyPress
Delphi
procedure KeyPress(var Key: Char); override;
C++
DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TCustomComboBoxEx |
Description
Responds to keyboard input.
Vcl.ComCtrls.TCustomComboBoxEx.KeyPress inherits from Vcl.Controls.TWinControl.KeyPress. All content below this line refers to Vcl.Controls.TWinControl.KeyPress.
Responds to keyboard input.
When a windowed control receives a key-press message (WM_CHAR) from Windows, its message handler calls the DoKeyPress method. If DoKeyPress determines that the control should, in fact, process the character, it calls KeyPress, passing the key code in the Key
parameter.
KeyPress calls any event handler attached to the OnKeyPress event. Override KeyPress to provide other responses in addition to the event handler call.
Either KeyPress or the OnKeyPress event handler it calls can suppress further processing of a character by setting the Key
parameter to zero.
Note: The
Key
parameter is the character represented by the key that is pressed, not a Windows virtual key code.