barx Well-Known Member Licensed User Longtime User Oct 20, 2012 #1 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
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
JonPM Well-Known Member Licensed User Longtime User Oct 20, 2012 #2 Code: Sub EditText_EnterPressed btnSearch_Click End Sub Upvote 0
barx Well-Known Member Licensed User Longtime User Oct 20, 2012 #3 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
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
barx Well-Known Member Licensed User Longtime User Oct 21, 2012 #5 i have this: Code: 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 Code: Sub txtActionSearch_EnterPressed If txtActionSearch.Text <> "" Then CommandMenu.strSearchCommand = txtActionSearch.Text StartActivity(CommandMenu) End If End Sub Upvote 0
i have this: Code: 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 Code: Sub txtActionSearch_EnterPressed If txtActionSearch.Text <> "" Then CommandMenu.strSearchCommand = txtActionSearch.Text StartActivity(CommandMenu) End If End Sub
Erel B4X founder Staff member Licensed User Longtime User Oct 21, 2012 #6 Your code should work. How is txtActionSearch initialized? Upvote 0
barx Well-Known Member Licensed User Longtime User Oct 21, 2012 #7 Like this Code: txtActionSearch.Initialize("") :signOops::sign0013: LOL now it's like this Code: txtActionSearch.Initialize("txtActionSearch") I thought this was going to sort it, just checked still no go...:BangHead: Upvote 0
Like this Code: txtActionSearch.Initialize("") :signOops::sign0013: LOL now it's like this Code: txtActionSearch.Initialize("txtActionSearch") I thought this was going to sort it, just checked still no go...:BangHead:
Erel B4X founder Staff member Licensed User Longtime User Oct 21, 2012 #8 Can you upload your project (File - export as zip)? Upvote 0
barx Well-Known Member Licensed User Longtime User Oct 21, 2012 #9 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
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
barx Well-Known Member Licensed User Longtime User Oct 21, 2012 #10 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
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
R Roger Garstang Well-Known Member Licensed User Longtime User Oct 25, 2012 #11 Using the IME library to handle the Done was actually the better option. Enter being pressed is not always the same thing. There is a switch for multiline textboxes that actually splits them so you can create newlines. Some vendors also customize their keyboards to behave differently too. Upvote 0
Using the IME library to handle the Done was actually the better option. Enter being pressed is not always the same thing. There is a switch for multiline textboxes that actually splits them so you can create newlines. Some vendors also customize their keyboards to behave differently too.