Event_Keydown
BlitzMax Forums/BlitzMax Beginners Area/Event_Keydown
| ||
Hi I made a listbox and a textbox I want to get what I typed in the textbox I tried this but does't work Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_KEYDOWN Print "hello" End Select I think that it miss something for the event_keydown someone can help ? |
| ||
Strict OnEnd VerifyQuit Global MainWindow:TGadget = CreateWindow("Test", (Desktop().Width/2)-200,(Desktop().Height/2)-200,400,400) Global TextField1:TGadget = CreateTextField(10,10,120,24,MainWindow) ActivateGadget(TextField1) SetGadgetFilter(TextField1, TextField1Filter) Main() End Function Main() While True WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End End Select Wend End Function Function VerifyQuit() If Proceed("Are you sure you want to quit?")<> 1 Then OnEnd VerifyQuit main() EndIf End Function Function TextField1Filter(Event:TEvent, Context:Object) Select event.id Case EVENT_KEYDOWN Print "Keydown detected" End Select Return 1 End Function |