Now i notice that the eventgadget gives a double signal back on one event (I mean all eventgadget give back the double signal)
Code: Select all
Enumeration FormWindow
#Window_test
EndEnumeration
Enumeration FormGadget
#Text_trough_file_Inserter
#Button_Done
#Text_1
EndEnumeration
Procedure OpenWindow_test(x = 0, y = 0, width = 495, height = 255)
OpenWindow(#Window_test, x, y, width, height, "", #PB_Window_SystemMenu)
StringGadget(#Text_trough_file_Inserter, 115, 50, 240, 30, "")
ButtonGadget(#Button_Done, 200, 150, 100, 40, "")
TextGadget(#Text_1, 120, 35, 155, 25, "Click once")
EndProcedure
Procedure Window_test_Events(event)
Select event
Case #PB_Event_CloseWindow
ProcedureReturn #True
Case #PB_Event_Menu
Select EventMenu()
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
Case #Text_trough_file_Inserter
Debug "Hit Text"
Case #Button_Done
ProcedureReturn #True
EndSelect
EndSelect
ProcedureReturn #False
EndProcedure
OpenWindow_test()
Repeat
If Window_test_Events(WaitWindowEvent())
End
EndIf
ForEver
Hit Text
Hit Text
Click on the button Done and the debug window show 4 time the text.
Normaly this is no problem. But i created a form with more then one StringGadgets. This is done to make a database.
And here is the problem. I click on the #Text_trough_file_Inserter and it got the focus.
But in my program i need to click again on the other line to get the focus on that line. Casue the Eventgadget returned the focus back to the first StringGadget again.