SetMenuItemState()
Syntax
Result = SetMenuItemState(#Menu, MenuItem, State)Description
Changes the specified MenuItem state. This functions allows you to display a 'check mark' next to the menu item text. The check is displayed when State equals 1, if State equals something else then the 'check mark' will not be displayed.
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
All