Uncheck

Description

Removes the check mark, if any, next to an item a drop-down or cascading menu and sets the item's Checked property to false.

Applies to

Menu objects

Syntax

menuname.Uncheck ( )

Argument

Description

menuname

The fully qualified name of the menu selection from which you want to remove the checkmark, if any. The menu must be on a drop-down or cascading menu, not an item on a menu bar.


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If menuname is null, Uncheck returns null.

Usage

A checkmark next to a menu item indicates that the menu option is currently on and that the user can turn the option on and off by choosing it. For example, in the Window painter's Design menu, a checkmark is displayed next to Grid when the grid is on.

You can use Check in an item's Clicked script to mark a menu item when the user turns the option on and Uncheck to remove the check when the user turns the option off.

Equivalent syntax

You can set the object's Checked property instead of calling Uncheck:

menuname.Checked = false

This statement:

m_appl.m_view.m_grid.Checked = FALSE

is equivalent to:

m_appl.m_view.m_grid.Uncheck()

Examples

This statement removes the checkmark next to the m_grid menu selection in the drop-down menu m_view on the menu bar m_appl:

m_appl.m_view.m_grid.Uncheck()

This example checks whether the m_grid menu selection in the drop-down menu m_view of the menu bar m_appl is currently checked. If so, the script unchecks the item. If it is not checked, the script checks the item:

IF m_appl.m_view.m_grid.Checked = TRUE THEN
      m_appl.m_view.m_grid.Uncheck()
ELSE
      m_appl.m_view.m_grid.Check()
END IF

See also

Check