Test for menu line checked

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

Syntax

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

Description

This command tests whether the specified line of a menu instance is checked. You specify the menu-instance-name and the line-number of the menu line you want to test. The flag is set if the specified line of the menu instance is checked, and cleared if the line is not checked. The flag is always cleared if the menu instance is not installed on the menu bar.

You can check menu lines using Check menu lineUncheck menu line removes the check.

Example

# Uncheck the menu line 'Large' if it is currently checked
Install menu mView
Check menu line mView/Large
Test for menu line checked mView/Large
If flag true
  Uncheck menu line mView/Large
End If
# Alternatively, you can see if a menu line is checked using notation
If $imenus.mView.$objs.Large.$checked
  Do $imenus.mView.$objs.Large.$checked.$assign(kFalse)
End If