Table of Contents

ACCELERATOR property

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).

See Also

Menu Builder chapter in Guide to Application Development.