SetItemCheck (set toggle item status)

Top  Previous  Next

 

SetItemCheck( name, status )

SetItemCheck

Sets the status of a toggle menu item.

name

A string constant, variable, EQUATE, or expression containing the menu item name. The AddItem, AddItemMimic, or AddMenu methods set the item name.

status

A Boolean constant, variable, EQUATE, or expression containing the status to which to set the toggle item. A status value of one (1) idicates a checked (on) item; zero (0) indicates an unchecked (off) item.

The SetItemCheck method sets the status of a toggle menu item. The GetItemChecked method returns the status of a toggle menu item.

Implementation:

The name parameter accepts up to 1024 characters.

Example:

IF PopupMgr.Ask() = 'Disable'            !if Disable item selected

 IF PopupMgr.GetItemChecked('Disable')   !if item is checked/on

  PopupMgr.SetItemCheck('Disable',False) ! toggle it off

  ENABLE(?Save)                          ! take appropriate action

 ELSE                                    !if item is not checked/off

  PopupMgr.SetItemCheck('Disable',True)  ! toggle it on

  DISABLE(?Save)                         ! take appropriate action

 END

END

See Also:     AddItem, AddItemMimic, AddMenu, GetItemChecked