RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TInplaceEdit.KeyDown Method

Responds when the user presses a key.

Pascal
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
C++
virtual __fastcall KeyDown(Word Key, TShiftState Shift);

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!