DisableMenuItem()

Syntax

DisableMenuItem(#Menu, MenuItem, State)
Description
Disable or enable the #Menu item with the 'MenuItem' number. If the State is 1, the menu item is disabled. If the State is 0, the menu item is enabled.

Example:
  If OpenWindow(0, 200, 200, 200, 100, "DisableMenuItem Example")
    If CreateMenu(0, WindowID(0))
      MenuTitle("Project")
        MenuItem(1, "Open")
        MenuItem(2, "Save")
        DisableMenuItem(0, 2, 1)     ; disable the second menu item (Save)
    EndIf
    
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

Supported OS

All

<- CreatePopupMenu() - Menu Index - DisplayPopupMenu() ->