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


Handles the specified key in Message as an accelerator or shortcut key.


Source position: controls.pp line 2202

protected function TWinControl.DialogChar(

  var Message: TLMKey

):Boolean; override;




Message with the character examined in the method.

Function result

True if the key was handled.


DialogChar is an overridden Boolean function in TWinControl used to handle a character code in Message as an accelerator (or shortcut) key for a control. It re-implements the inherited method which always returns False. In TWinControl, the Message is sent to each of the children in Controls until one of them indicates that it responds to the accelerator key.

DialogChar is overridden in descendent classes to perform actions needed when the shortcut key is handled in the method. These classes allow the accelerator key to be defined using the Caption or Shortcut properties. Some examples include:

See also



Performs actions needed to handle an accelerator key for the control.

CT Web help

CodeTyphon Studio