B4A Question Edittext max length - Mahares (first post)    Nov 17, 2016   (6 reactions) If you have the edit text created in the Designer, do not initialize it. That is why you are getting nothing. The below code works.
Sub Globals
Dim IME As IME
Dim edtTest As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layout1")
edtTest.Color=Co B4A Question Max Chars in Edit Text - Erel (first post)    Apr 19, 2018   (1 reaction) There are limits on some devices.
It makes sense to control the string length:
If EditText1.Text.Length > 10000 Then
EditText.Text = EditText.Text.Substring2(5000, EditText.Text.Length) B4A Question EditText max characters? - sorex (first post)    Nov 17, 2015   (1 reaction) there is a textChanged event that you can use to count the chars and if it's bigger than you limit put back the old value.
someone put this in a codemodule once but it's easy to make it yourself. B4A Code Snippet EditText Max Length - Erel (first post)    Feb 21, 2016   (4 reactions) It is better to use IME.SetLengthFilter.
Note that in your code you should use New.Substring2(0, 6) if you want to support paste actions. B4A Question EditText limited the rows on "EnterPressed" - Alexander Stolte    Jul 19, 2017 Hello,
i dont found a answer in this Forum about this, you can set the max lenght of the text, but not the max rows. Where can i set the max rows of the EditText? Because i do not want, users can thousand lines go down and can upload this.
Thanks. Italian EditText MAX - LucaMs (first post)    Feb 14, 2019   (1 reaction) Ciao.
Dovresti usare la libreria IME:
https://www.b4x.com/android/help/ime.html#ime_setlengthfilter B4A Question set max number of char in a edit text - klaus (first post)    Dec 17, 2018   (2 reactions) This might interest you: EditText max length. Wish EditText: Max text lenght - Fabio Vieira    Feb 19, 2020 I think it will be very useful if there was this property in the textbox object. I know it is possible to use the IME to do this, but it would be more practical if this property exists in the designer. B4A Library BasicLib interpreter and BasicIDE development IDE revisited - agraham (first post)    Mar 17, 2019   (1 reaction) Thats' not why they are underlined. The editor isn't that clever, there is no code in the main module that does that. The editor is an unadorned EditText which is why I suggest in the help that you use a dedicated code editor like Quoda to edit the code. I've haven't had time to investigate but it l Italian EditText - Jeffrey Cameron (first post)    Feb 14, 2019   (2 reactions) Welcome, Roby, you are posting in the English forum, there is a separate Italian forum: https://www.b4x.-forum.13/ As for your question, you should investigate the IME object (specifically the SetLengthFilter method): https://www.b4x./?query=edittext+max Page: 1   2   3   4   5   6   7   Powered by ColBERT |