Detect Keyboard 'Done'

barx

Well-Known Member
Licensed User
Longtime User
So, I just discovered the .ForceDoneButton and have a use for it.

How can we detect this?

I have a edittext for user to enter search criteria and a 'Search' button but can we detect the user pressing the 'Done' on the onscreen keyboard and from that fire the btnSearch_Click.

Thanks
 

barx

Well-Known Member
Licensed User
Longtime User
That's what I thought to be honest JonPM and I tried that but the event never triggered. I will give it another go later and report back.

thanks
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Nope, not working.

darn
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
i have this:

B4X:
   txtActionSearch.ForceDoneButton = True

And when 'Done' is pressed I try to handle with this. I didn't have the btn_Click in case I got that wrong too ;)

B4X:
Sub txtActionSearch_EnterPressed
   If txtActionSearch.Text <> "" Then
      CommandMenu.strSearchCommand = txtActionSearch.Text
      StartActivity(CommandMenu)
   End If
End Sub
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Like this

B4X:
txtActionSearch.Initialize("")

:signOops::sign0013:

LOL

now it's like this

B4X:
txtActionSearch.Initialize("txtActionSearch")


I thought this was going to sort it, just checked still no go...:BangHead:
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
I know it's something that you like to do but would it be possible to send it to you private as it has some copyright material that I am in the contact with the manufacturer with for release permission.

Or, if you prefer I could write a sample with the same setup?

just nipping out for a couple of hours so will read you reply and act on it when I get back. Thanks
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Now sorted thanks.

I created an example and IT worked right.

The problem was:

I was using the IME library and for some reason I had used the .AddHandleActionEvent which thinking about. Would consume the event.

Removed that and all working.

Thanks
 
Upvote 0
Top