TCustomGrid.KeyPress procedure
Applies the specified key press character to the control.
Declaration
procedure KeyPress(var Key: char); overrideArguments
Key | Key press character examined in the method. |
Description
KeyPress is a method used to apply the character in
Key
to the grid control. KeyPress is overridden to ensure that a key which
originated from the grid control is applied properly to the cell
Editor (when needed). It calls the inherited method on entry to
signal the
OnKeyPress event handler (when assigned).
KeyPress uses the value in EditorKey to determine if Key applies to
an active cell Editor on the control. If KeyDown did not flag the value for
the Editor control, the following values in Key are handled in the method:
- Enter (#13)
- Gets and displays the cell Editor when EditMode is False and the column allows editing. This includes signalling the OnSelectEditor event handler (when assigned).
- Backspace (^H), and characters in the range #32..#255 (data)
- Calls EditorShowChar to apply the key press to the Editor (when editing is enabled).
When Key is handled in the method, it is set to #0 prior to exit.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
