ForceDoneButton versus SingleLine False

wdegler

Active Member
Licensed User
Longtime User
I want to use a multiline textbox and show the Done button to allow the keyboard to be closed after an entry.

The following code will not show the Done button unless I remove the SingleLine statement. Neither order of the statements work. How can I have both?

Sub Activity_Create(FirstTime As Boolean)
Dim Edt As EditText
Edt.Initialize("Edt")
Edt.ForceDoneButton=True
Edt.SingleLine = False
Activity.AddView(Edt,10%x,10%y,50%x,20%y)
End Sub
 

wdegler

Active Member
Licensed User
Longtime User
Purpose of .SingleLine=False

I see that I can have a multiline textbox even without the statement Edt.SingleLine=False. What is its purpose then?
 
Upvote 0

wdegler

Active Member
Licensed User
Longtime User
The purpose seen.

I see the purpose of the .SingleLine=False now from a response Erel gave to another person's question. This leaves the question of how best to allow the user to use Enter in a multiline textbox to enter multiple lines and yet close the keyboard when finished with a Done button. Ideas?
 
Upvote 0

wdegler

Active Member
Licensed User
Longtime User
About Phone.HideKeyboard

Thank you for the information.
I tried using

Dim Ph as phone
Ph.HideKeyboard

'Phone' was not accepted. Then, I added the Phone library to my list.
Next, 'HideKeyboard' was not accepted.

I see that I have Basic4Android version 1.50. Do I need version 1.6 for this method? If so, is there any price advantage for someone who already has version 1.50?
 
Upvote 0

wdegler

Active Member
Licensed User
Longtime User
Libraries in 1.60?

I was just about to download B4A 1.60 when I saw

"Limitation:
Libraries are not supported"

What am I giving up to go from 1.50 to 1.60?

What is the best site to buy Basic4Android 1.60?
 
Last edited:
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
I see the purpose of the .SingleLine=False now from a response Erel gave to another person's question. This leaves the question of how best to allow the user to use Enter in a multiline textbox to enter multiple lines and yet close the keyboard when finished with a Done button. Ideas?

You could use a custom keyboard (see: http://www.b4x.com/forum/basic4andr.../11631-custom-keyboard-creator-interface.html) but this would either have to be an essential feature to justify replacing the entire keyboard, or if you don't need to give the user a full keyboard (e.g.: just numbers), then it makes more sense.
 
Upvote 0

wdegler

Active Member
Licensed User
Longtime User
I have a satisfactory solution

I thank you both for your responses. I have decided not to use a new version of B4A on an app about ready to be published. I may use B4A version 1.60 for a future app to accomplish these things. For this app, I have a hint in my multiline textbox to press my "Finish' button when done, then the 'Done' key which I provide using an invisible textbox with a 'Force Done Button'. Not elegant but it works.
 
Upvote 0
Top