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

TMenu.IsShortcut

Indicates if the specified control message contains a shortcut (accelerator) key used in the menu.

Declaration

Source position: menus.pp line 413

public function TMenu.IsShortcut(

  var Message: TLMKey

):Boolean;

Arguments

Message

  

Control message examined in the method.

Function result

True when the message matches a menu item shortcut in Items.

Description

Is Shortcut is a Boolean function used to determine if the control message in Message contains a shortcut (accelerator) key used in the menu. It converts the CharCode and KeyData in Message to a shortcut value by calling the ShortCut routine.

The FindItem method is called to locate the menu item with the value in its Shortcut property. The ShortCutHandled property is updated to indicate whether the shortcut value exists in Items.

IsShortCut checks the Parent for the menu item to determine if the shortcut key is handled in the parent menu item. The InitiateAction and Click methods for the menu item are called if the parent handles the shortcut value.


Version 4.0 Generated 2025-05-03 Home