BindEvent (PB_Event_ActivateWindow)
Posted: Wed May 25, 2016 7:04 pm
Why happens every time when you click on the title?
Code: Select all
Procedure ActivateWindowHandler()
Debug "Activate BindEvent on window #" + EventWindow()
EndProcedure
Procedure DeactivateWindowHandler()
Debug "Deactivate BindEvent on window #" + EventWindow()
EndProcedure
OpenWindow(0, 100, 100, 200, 200, "Activate bug test", #PB_Window_SizeGadget | #PB_Window_SystemMenu)
EditorGadget(0, 10, 10, 180, 180)
BindEvent(#PB_Event_ActivateWindow, @ActivateWindowHandler())
BindEvent(#PB_Event_DeactivateWindow, @DeactivateWindowHandler())
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_ActivateWindow
Debug "Activate event on window #" + EventWindow()
Case #PB_Event_DeactivateWindow
Debug "Deactivate event on window #" + EventWindow()
EndSelect
Until Event = #PB_Event_CloseWindow