|
|||
|
This can be done by handle the onUpdateItem event. Everytime when system display a menu item, the onUpdateItem event handler is called, in which you can determine whether the item needs to be checked. E.g
Code:
var checkSwitch = false;
Menu.onUpdateItem = function (identifier, state)
{
if (identifier == 'myItem') state.check = checkSwitch;
}
Menu.onCommand = function (identifier)
{
if (identifier == 'myItem') checkSwitch = !checkSwitch;
}
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|