Unit 'Controls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TControl.DoCallKeyEventHandler

Passes key events for the specified type to the handlers added to the control.

Declaration

Source position: controls.pp line 1482

protected procedure TControl.DoCallKeyEventHandler(

  HandlerType: TControlHandlerType;

  var Key: Word;

  Shift: TShiftState

);

Arguments

HandlerType

  

Type for the handler, like OnKeyDown.

Key

  

Key code for the key event notification.

Shift

  

Shift, Ctrl, or Alt modifier for the key event notification.

Description

DoCallKeyEventHandler iterates over the handler routines using the type specified in HandlerType. The routines are cast to the TKeyEvent type used to implement the handler and receives the arguments specified in Key and Shift. The current class instance is used as the Sender for the event notification.

DoCallKeyEventHandler is called from the KeyDown method in descendent classes like TWinControl.

See also

TWinControl.KeyDown

  

Signals the OnKeyDown event handler (when assigned).

TControlHandlerType

  

Notification handler types.

TKeyEvent

  

Defines an event handler for key events.

TShiftState



CT Web help

CodeTyphon Studio