MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%EnableMenu ( AppId [ , Value ] )

Enables or diasbles choices on the menu structure of the current window.

AppId The Application identification of the menu choice to be enabled. If there is more than one menu choice matching the identification, all are affected. If AppId takes the form @var then the matching occurs at run-time. Otherwise it occurs at compile-time, when multiple-matches give rise to a warning and non-match causes a compilation error.

Value An expression that evaluates to true to enable, false to disable. The default is true.

The macro %%EnableMenu is used to activate or disable choices on the menu structure of the current window, allowing them to be selected or graying them out.

Examples

%%EnableMenu(Edit:Cut)
Activate the menu choice with application identification "Edit:Cut" on the current window.

%%EnableMenu(@which,yn)
Enable or disable the menu choice with the application identification matching the value of variable which, depending on whether or not variable yn has a true value (true means enable, false means disable).

See also

%%PopMenu and %%MarkMenu