Char

[event icon] Char() Event

Called when the user presses a key

Applies to: Grid


>

Char

The Char() event is called when the user presses a key that is not used by the grid itself (e.g. the arrow keys are used by the grid for navigation). The properties LastChar$ and LastKey are set to indicate which key was pressed.

If there is no Char() event handler, then the space key will generate a LeftClick() event on the current cell (whenever a single left-click would be accepted), and similarly the return key will generate a LeftClick() followed by a LeftDblClk() event (for the return key to be accepted, the WantReturn property must be set).

Grid cells in edit mode do not generate char() events.

See also

Grid methods, properties and events.