In the IDE I tried setting a #Constant and also Event Procedure for it, but the switch from Design->Code->Design forgets and overwrites it
To demonstrate, the following code makes 3 Title menus (Parent1/2/3), each with a Child1 & Child2 submenu ...
The code then DisableMenuItems 1 through 6 ... which correctly disables each submenu ... but how to disable a title menu?
Code: Select all
If OpenWindow(0,200,200,200,100,"Menu Test")
If CreateMenu(0, WindowID(0))
MenuTitle("Parent1")
MenuItem(1, "P1Child1")
MenuItem(2, "P1Child2") <-- Easy to disable this one
MenuTitle("Parent2") <-- But how to disable this one?? docs for MenuTitle says it only accepts a text, no identifier constant/#PB_Any
MenuItem(3, "P2Child1")
MenuItem(4, "P2Child2")
MenuTitle("Parent3")
MenuItem(5, "P3Child1")
MenuItem(6, "P3Child2")
For i = 1 To 6
DisableMenuItem(0,i,1) ;disable menus 1-6, but that only disables the submenus
Next i
EndIf
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf