The following code does 2 strange things :
Code: Select all
#Window_0 = 0
#MenuBar_25 = 0
#MENU_1 = 101
#MENU_2 = 102
#Gadget_1 = 10
Procedure Open_Window_0()
If OpenWindow(#Window_0, 211, 114, 515, 491, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "New window ( 0 )")
If CreateMenu(#MenuBar_25, WindowID())
MenuTitle("File")
MenuItem(#MENU_1, "Save")
MenuItem(#MENU_2, "Quit")
MenuTitle("About")
EndIf
If CreateGadgetList(WindowID())
ButtonGadget(#Gadget_1, 105, 30, 45, 30, "B1")
EndIf
EndIf
EndProcedure
Open_Window_0()
Repeat
Event = WindowEvent()
Menu = EventMenuID()
Delay(1)
StartDrawing(WindowOutput())
Locate( 50, 120 )
DrawText("MENU "+ Str( Menu ) + " ")
StopDrawing()
Until Event = #PB_EventCloseWindow
EndIf I click on File and select 'Save' value 101 is displayed until I select
another item. EventMenuID() still detect 'Save' selected when the menu
is closed.
Second :
EventMenuID() detects when I click on the button #gadget1. I thought
it was supposed to only detect events on menu... as EventGadget() is
supposed to do with gadgets ONLY.
Any idea


