Test for menu line enabled

Command group Flag affected Reversible Execute on client Platform(s)
Menus YES NO NO All

Syntax

Test for menu line enabled line or instance-name/line

Description

This command tests whether the specified line of a menu instance is enabled. You specify the menu-instance-name and the method-number of the menu line you want to test. It sets the flag if the specified line of the menu instance is enabled. The flag is cleared if the menu instance is not installed on the menu bar.

This command may still return false if the current user has no access to the menu line or if the line is disabled because there is no current record, even after Enable menu line has been executed.

You can disable or enable menus using Disable menu line and Enable menu line.

Example

# Install the menu mMyMenu if it is not already installed
Test for menu installed {mMyMenu}
If flag false
  Install menu mMyMenu
End If