MenuItem() > Instance variables |
Caption string of the menu item.
Data type: | C | Default: | "" |
The instance variable :caption holds the character string that is actually displayed on screen within a TopBarMenu() or a Popup() menu. The caption may also define the accelerator key for a menu item by prefixing a single character in the caption string with an ampersand (&). If present, the corresponding character is displayed in a different color than the rest of the caption.
When a MenuItem object is contained in a TopBarMenu() object, a user can select a menu item by pressing the accelerator key together with the Alt key. If the MenuItem object is maintained by a Popup() menu, the menu item is selected when a user presses only the accelerator key.
Note: if :caption contains the #define constant MENU_SEPARATOR from Button.ch, the menu item is displayed as a horizontal separator line and becomes not accessible.
http://www.xHarbour.com