SetMenuItemState()
Syntax
Result = SetMenuItemState(#Menu, MenuItem, State)Description
Changes the specified MenuItem state. This is useful to add a 'check mark' near to the menu item text. If the 'State' is 1, then the check mark is displayed, else the check mark is removed.
GetMenuItemState() can be used to retrieve the current menu item state.
Example:If OpenWindow(0, 200, 200, 200, 100, "SetMenuItemState Example") If CreateMenu(0, WindowID(0)) MenuTitle("Project") MenuItem(1, "Changed") SetMenuItemState(0,1,1) ; set check mark before the previously created menu item EndIf Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow EndIf
Supported OS
Windows, AmigaOS, MacOS X