User Tools

Site Tools


setitemcheck_set_toggle_item_status_.htm
Navigation:  ABC Library Reference > PopupClass > PopupClass Methods >====== SetItemCheck (set toggle item status) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

SetItemCheck( name, status )

blk2blue.jpg

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

setitemcheck_set_toggle_item_status_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1