A labelled-menu-item<%> object is a menu-item<%> with a string label (i.e., any menu item other than a separator). More specifically, it is an instance of either menu-item% (a plain menu item), checkable-menu-item% (a checkable menu item), or menu% (a submenu).
enabled? : any/c
Enables or disables the menu item. If the item is a submenu (or menu in a menu bar), the entire menu is disabled, but each submenu item’s is-enabled? method returns #f only if the item is specifically disabled (in addition to the submenu).
Returns the help string for the menu item, or #f if the item has no help string.
When an item has a help, the string may be used to display help information to the user.
Returns the item’s label.
Returns #t if the menu item is enabled, #f otherwise.
See also enable.
Specification: Normally called when the user clicks on the menu bar containing the item (before the user sees any menu items), just before the popup menu containing the item is popped up, or just before inspecting the menu bar containing the item for a shortcut key binding.
Default implementation: Calls the demand-callback procedure that was provided when the object was created.
Sets the help string for the menu item. Use #f to remove the help string for an item.
label : label-string?
Sets the menu item’s label. If the item has a shortcut, the shortcut is not affected.
If the label contains & and the window is a control, the label is parsed specially; under Windows and X, the character following a & is underlined in the displayed menu to indicate a keyboard mnemonic. Pressing the Alt key with an underlined character from a menu’s name in the menu bar causes the menu to be selected (via on-menu-char). When a menu has the focus, the mnemonic characters are used for navigation without Alt. A && in the label is replaced by a literal (non-navigation) &. Under Mac OS X, &s in the label are parsed in the same way as for X and Windows, but no mnemonic underline is displayed.
For historical reasons, if a label contains a tab character, then the tab and all remaining characters are hidden in the displayed menu.