Applies to

Menu items.

Description

Returns or defines an accelerator key for a menu item.

Usage

accel = Get_Property(menuitem, "ACCELERATOR")

accel = Set_Property(menuitem, "ACCELERATOR", number)

Remarks

Number is the accelerator value, and is calculated using the following algorithm.

AlgorithmExample
Virtual key code + 256 for SHIFT keySHIFT+A is: 256 + 65 = 321
virtual key code + 512 for CONTROL keyCTRL+A is: 512 + 65 = 577
virtual key code + 1024 for ALT keyALT+A is: 1024 + 65 = 1089

To display the accelerator in a menu, add it to the text separated by the tab character, char(9).

  • No labels