Check menu line

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

Syntax

Check menu line line or instance-name/line

Description

This command places a check mark on the specified line of a menu instance to show that the option has been selected. You specify the menu instance name and the number of the menu line you want to check.

You can remove the check mark with Uncheck menu line. If you use this command in a reversible block, the check mark is removed when the method terminates. Nothing happens if the menu instance is not installed on the menu bar.

Example

# Test whether a line in the menu instance is checked and
# either check or uncheck it accordingly.
Install menu mView
Test for menu line checked mView/Large
If flag true
  Uncheck menu line mView/Large
Else
  Check menu line mView/Large
End If
# Alternatively, you change the $checked property of a line
# in the menu instance using notation
Do $imenus.mView.$objs.Large.$checked.$assign(kTrue)