B4J Question How to activate a button when user presses ENTER in a TextField??

MegatenFreak

Active Member
Licensed User
Hi.
I have forms in my app with one or more text fields. The thing is, nothing happens when the user presses ENTER after filling out a field. They have to click the OK button I've put below the form with their mouse. and that's inconvenient. How can I make it so pressing ENTER in a textfield would act like the button?
Thanks a lot in advance.
 

mangojack

Well-Known Member
Licensed User
Longtime User
have you added an Action event for the TextFields ?

B4X:
Sub TextField1_Action
    Log("User Has Pressed OK")
    'code to be executed ...
End Sub
 
Upvote 0
Top