DisableMenuItem()

Syntax

DisableMenuItem(#Menu, MenuItem, State)
Description
Disable (or enable) the #Menu item with the 'MenuItem' number. If State equals 1 then the menu item is disabled, while if State equals 0 then 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() ->