[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.KeyPress

Applies the specified key press to the control.

Declaration

Source position: grids.pas line 1121

protected procedure TCustomGrid.KeyPress(

  var Key: Char

); override;

Arguments

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.

The following key press 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.
Backspace (^H) and characters in the range #32..#255 (data)
Applies the key press to the Editor.

When Key is handled in the method, it is set to #0 prior to exit.

See also

TWinControl.KeyPress

  

Signals the OnKeyPress event handler (when assigned).