Hide Device KeyBoard

junaidahmed

Well-Known Member
Licensed User
Longtime User
sorry its not working When trigger EnterPressed event in button click event, my code is

Sub Button1_Click()

EditText_EnterPressed

End Sub

Sub EditText_EnterPressed

EditText.ForceDoneButton = False

End Sub

pls advise how to hide keyboard when clicking button.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Attached a small test program.
Button1 copies the text from EditText1.Text to Label1.Text.
EditText2 has the ForceDone parameter set to True.
The EditText2_EnterPressed routine copies the text from EditText2.Text to Label2.Text similar to Button1_Click.

That's what Erel suggests.

Best regards.
 

Attachments

  • HideKeyboardTest.zip
    5.8 KB · Views: 1,142
Upvote 0

Gary Miyakawa

Active Member
Licensed User
Longtime User
Just wondered if maybe a resolution to this got pulled into 1.5.... Looking for someway to set "hideSoftInputFromWindow" thru B4A...

Thanks,

Gary M
 
Upvote 0

TDowdeswell

Member
Licensed User
Longtime User
Soft Keyboard display


I'm a VB6 and VBA developer rapidly getting to grips with B4A (and Android 'phones).

Which is the 'Done' key on the soft kb? I have read that 'Back' is often used with Android but this doesn't seem to have the desired effect - it just deletes the previous chartacter, as I would expect.

I have set ForceDone=True for all my text inputs and can trap the event but what should I do with it once it's trrapped so that I can remove the keyboard and display another panel?

Thanks for any help,



Terry Dowdeswell
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
I'm a VB6 and VBA developer rapidly getting to grips with B4A (and Android 'phones).

Which is the 'Done' key on the soft kb? I have read that 'Back' is often used ...
Thanks for any help,

Terry Dowdeswell

Yesterday I saw a post from Agraham about using his Reflection library to implement functions that have not yet been exposed in B4A:


I wonder if this procedure could be used to hide the soft keyboard?

Thanks,
Barry.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…