Sets a heading's caption and/or options. Can also set an item's caption, accelerator, and/or options.
Synopsis
error = GuiSetMenuOpts(Specification, Options, Caption, Accelerator)
Args
Specification is the name of the REXX variable associated with the heading or item. If supplying the name directly, quote it.
Note: If you specify the ID option below, then Specification is instead the ID number for the heading/item.
Options are the options desired for the item/heading. You can specify any, all, or none of the following, each separated by a | character:
Option Meaning MARK A checkmark is shown beside the item's caption. Do not use this option on a heading.
AUTO The checkmark is automatically toggled on or off each time the user selects the item. If you do not select this option, then you must manually set/clear the checkmark yourself by calls to GuiSetMenuOpts to specify or not specify the MARK option. Do not use this option on a heading.
ID When the user selects this item, the window's MENUID event handler is called. This menu item therefore no longer has its own individual event handler. Do not use this option on a heading.
GRAY The menu item/heading is disabled, and shown in a gray color to indicate such. DISABLE The menu item/heading is disabled, but not shown in a gray color. BREAK The item is shown in another column. Do not use this option on a heading.
BARBREAK The item is shown in another column with a line separating the column. Do not use this option on a heading.
HELP A HELP event happens when the user is highlighting this item and he presses the F1 key.
If Option is omitted, then the item/heading's options are not altered. If you specify an empty string, then all of the above options are removed.
Caption is the caption (text) desired for the item/heading. If omitted, then the caption is not changed. Note that a & character preceding a letter causes that letter to be underlined, and used as a mnuemonic. You can also specify a tab character using '07'X, for example:
GuiSetMenuOpts('MyPasteItem', , 'Paste' || '07'X || 'CTRL V')If changing a menu item (and not a heading), then Accelerator is the desired keyboard shortcut that the user can press to activate the item. If Accelerator is omitted, then the item/heading's accelerator is not altered. If you specify an empty string, then its accelerator assignment is removed.
Returns
If successful, an empty string is returned. Otherwise, an error message.