I have an activity with several EditTexts, I have a sub that is actioned whenever the Enterpressed event occurs on any of the EditTexts.
Instead of writing a Sub to handle each editText is there a way to detect Enterpressed on any EditText.
Regards Roger
IE:
B4X:
'Instead of:
Sub Edt1_EnterPressed
Action
End Sub
Sub Edt2_EnterPressed
Action
End Sub
Sub Edt3_EnterPressed
Action
End Sub
Etc. Etc. Etc......
'could possibly be:
Sub AnyOldEdt_EnterPressed
Action
End Sub
didn't i explain this to you in a different thread yesterday? you use the tag property to identify which edittext the user was in when she pressed the enter key...
didn't i explain this to you in a different thread yesterday? you use the tag property to identify which edittext the user was in when she pressed the enter key...
i believe my answer from that link said, among other things:
if you only have 1 edittext view, then you don't need:
B4X:
Dim editer As EditText
editer = Sender
this part. (and, of course, you wouldn't need to reference the tag property. if you have multiple edittext views and you wanted to know which one had the focus, you would populate the tag property and then refer to it in the enter_press and/or focus_changed subs.