Hi,
When I have focus on a TextField and press the Enter button,
the TextField looses focus, and if I try to use ActivateGadget on it right away it'll just loose focus instantly again.
I've tried using SetGadgetFilter, but the Enter button will not show up.
Anyone know how to solve this?
Just enter a text and press Enter, the textfield will loose focus and will not get it back even though I use ActivateGadget when the button gets pressed.
How it should work is that the Textfield should get focus again, but it doesn't for me..
Thanks
When I have focus on a TextField and press the Enter button,
the TextField looses focus, and if I try to use ActivateGadget on it right away it'll just loose focus instantly again.
I've tried using SetGadgetFilter, but the Enter button will not show up.
Anyone know how to solve this?
Strict Local WW:Int = 200 Local WH:Int = 50 Local WX:Int = GadgetWidth(Desktop())/2-WW/2 Local WY:Int = GadgetHeight(Desktop())/2-WH/2 Global MainWindow:TGadget = CreateWindow( "Testing.", WX, WY, WW, WH, Null, WINDOW_TITLEBAR | WINDOW_CLIENTCOORDS ) Global MainWindowInput:TGadget = CreateTextField( 5, 5, 190, 20, MainWindow ) Global MainWindowBtn:TGadget = CreateButton( "Click", 5, 25, 190, 20, MainWindow, BUTTON_OK ) ActivateGadget( MainWindowInput ) Repeat If PeekEvent()<>Null WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_GADGETACTION Select EventSource() Case MainWindowBtn SetGadgetText( MainWindowInput, "" ) ActivateGadget( MainWindowinput ) End Select End Select EndIf Delay 2 Forever
Just enter a text and press Enter, the textfield will loose focus and will not get it back even though I use ActivateGadget when the button gets pressed.
How it should work is that the Textfield should get focus again, but it doesn't for me..
Thanks