Restored from previous forum. Originally posted by fweil.
I used to check EventType() = #PB_EventType_ReturnKey like in the following example to make input string gadget in my programs. The example program allows to look all events types in the debugger.
It seems that it does not respond like before using the 3.20.
Do I use it bad ?
;*******************************************
Quit.w
WEvent.l
GEvent.l
MEvent.l
TEvent.l
IEvent.l
UserInput.s
Quit = #FALSE
If OpenWindow(0, 0, 0, 320 + 20 , 240 + 20 , #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar, "")
CreateMenu(0, WindowID())
MenuItem(9, "Quit")
CreateGadgetList(WindowID())
StringGadget(10, 10, 10, 300, 20, "input gadget", #PB_String_BorderLess)
ButtonGadget(18, 220, 210, 40, 20, "OK")
ButtonGadget(19, 270, 210, 40, 20, "Quit")
Repeat
WEvent = WaitWindowEvent()
GEvent = EventGadgetID()
MEvent = EventMenuID()
TEvent = EventType()
IEvent = EventWindowID()
If GEvent = 10 And TEvent = #PB_EventType_ReturnKey
UserInput = GetGadgetText(10)
EndIf
If GEvent = 18
UserInput = GetGadgetText(10)
endif
If GEvent = 19
Quit = #TRUE
EndIf
If MEvent = 9
Quit = #TRUE
EndIf
If WEvent = #PB_EventCloseWindow
QUit = #TRUE
EndIf
Until Quit
EndIf
End
;*******************************************
Francois Weil
14, rue Douer
F64100 Bayonne
Events support with 3.20
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by fred.
That's true, this event was returned with a MutliLine string gadget. You can add the #PB_String_MultiLine flags if you absolutely need it. Anyway, better use keyboard shortcuts (AddKeyboardShortcut(Window, #PB_Shortcut_Return)) now...
Fred - AlphaSND
That's true, this event was returned with a MutliLine string gadget. You can add the #PB_String_MultiLine flags if you absolutely need it. Anyway, better use keyboard shortcuts (AddKeyboardShortcut(Window, #PB_Shortcut_Return)) now...
Fred - AlphaSND
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm