Uncheck PowerScript function
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.
Controls
Menu objects
Syntax
|
1 |
<span>menuname</span>.<span>Uncheck</span> ( ) |
|
Argument |
Description |
|---|---|
|
menuname |
The fully qualified name of the menu |
Return Values
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:
|
1 |
<span>menuname</span>.Checked = false |
This statement:
|
1 |
m_appl.m_view.m_grid.Checked = FALSE |
is equivalent to:
|
1 |
m_appl.m_view.m_grid.<span>Uncheck</span>() |
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:
|
1 |
m_appl.m_view.m_grid.<span>Uncheck</span>() |
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:
|
1 |
IF m_appl.m_view.m_grid.Checked = TRUE THEN |
|
1 |
m_appl.m_view.m_grid.<span>Uncheck</span>() |
|
1 |
ELSE |
|
1 |
m_appl.m_view.m_grid.Check() |
|
1 |
END IF |