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

TCustomButton.ShortCut

Shortcut key for the control.

Declaration

Source position: stdctrls.pp line 1256

public property TCustomButton.ShortCut : TShortcut
  read FShortCut;

Description

ShortCut is a TShortCut property with the primary shortcut key or accelerator key for the control. The property value contains both the virtual key code and the shift modifier for the short cut key.

The value in ShortCut is automatically updated when a caption is assigned for the control which includes an accelerator key. The accelerator key is designated using an Ampersand (&) character before the character used as the short cut. A value assigned in this manner always includes the ssCtrl modifier in the short cut value by default.

The property value (along with ShortcutKey2) is passed to the widgetset class when the WSSetText method is called.

Use the ShortCut and ShortCutToKey routines in the menu.pp unit to convert to and from virtual key codes with shift modifiers.



CT Web help

CodeTyphon Studio