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
method returns #f
only if the item is specifically disabled (in addition to the
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.
See also set-label and
, except that
s and tab characters in the label are stripped in
the same way as for set-label
Returns #t if the menu item is enabled, #f
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.
for further details.
A on-demand in menu-item-container<%> method can be overridden
in such a way that the container does not call the
on-demand method of its items.
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.
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; on Windows and Unix, 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)
&. On Mac OS, &s in the label are parsed in
the same way as for Unix and Windows, but no mnemonic underline is
displayed. On Mac OS, a parenthesized mnemonic character is
removed (along with any surrounding space) before the label is
displayed, since a parenthesized mnemonic is often used for non-Roman
languages. Finally, for historical reasons, if a label contains a tab character, then the
tab and all remaining characters are hidden in the displayed menu.
All of these rules are consistent with label handling in button%
and other windows.
is always preserved in the label returned by
, but never preserved in the
label returned by get-plain-label