Textfields and RETURN key

BlitzPlus Forums/BlitzPlus Programming/Textfields and RETURN key

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm sure this used to work ..
; Textfield - RETURN/ENTER

win=CreateWindow("TextField - Change Contents",270,240,234,104,Desktop(),1)
tf=CreateTextField(20,20,160,20,win,0)
ActivateGadget tf

Const MAXCHARS=14

Repeat
	ev=WaitEvent()
	Select ev
		Case $803 ; close [X]
		Exit
		Case $401 ; gadgethit
		If EventSource()=tf ; textfield
			; limit text characters
			SetGadgetText tf,Left$(TextFieldText$(tf),MAXCHARS)
			DebugLog EventData()
			; RETURN pressed
			If EventData()=13 SetGadgetText tf,"plop"
		EndIf
	End Select
Forever
End

Can't seem to pick up the RETURN/ENTER keys anymore(?)