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.
Algorithm | Example |
---|---|
Virtual key code + 256 for SHIFT key | SHIFT+A is: 256 + 65 = 321 |
virtual key code + 512 for CONTROL key | CTRL+A is: 512 + 65 = 577 |
virtual key code + 1024 for ALT key | ALT+A is: 1024 + 65 = 1089 |
To display the accelerator in a menu, add it to the text separated by the tab character, char(9).