Vcl.Grids.TInplaceEdit.KeyDown
Delphi
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
C++
DYNAMIC void __fastcall KeyDown(System::Word &Key, System::Classes::TShiftState Shift);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | Vcl.Grids.pas Vcl.Grids.hpp |
Vcl.Grids | TInplaceEdit |
Description
Responds when the user presses a key.
When the user presses a key, KeyDown checks whether the edit control or grid should process the KeyDown event. The Enter key is always passed on to the grid. The F2 key calls Deselect to remove the current selection. Navigation keystrokes are passed on to the grid when the movement cannot be accommodated within the text window. For example, if the user types Left when the cursor is already at the left edge of the edit window, the keystroke is passed to the grid which moves focus to the previous cell. If the cursor is in the middle of a line, the keystroke is processed by the edit window, which moves left a single character.
KeyDown calls the OnKeyDown event handler for the grid, if there is one, before calling the inherited KeyDown for the edit control.