Code: Select all
OpenWindow(1,0,0,320,200,"Test",#PB_Window_ScreenCentered | #PB_Window_SystemMenu)
TextGadget(10,10,60,320,200,"Close this window",#PB_Text_Center)
ButtonGadget(20,238,170,75,23,"Close")
Repeat
event=WaitWindowEvent()
If event=#PB_Event_Gadget
eventgadget=EventGadget()
If eventgadget
Debug eventgadget
EndIf
EndIf
Until event=#PB_Event_CloseWindow Or eventgadget=20
CloseWindow(1)
End
In 6.21 Beta 6, the value of the TextGadget (10) is returned by EventGadget() and not the button.
The TextGadget is acting as if #SS_NOTIFY has been included in the style, even though it has not.
The height of the TextGadget is, of course, way too large. If it is reduced to 20 or anything that does not overlap the Close button, then the correct value is returned.
I tested this on both Win 10 and 11 systems with the same result.
Again, not sure if this is a bug or a change.