anallie0 Active Member Licensed User Longtime User Jun 6, 2014 #1 hi to all There is a simple way to set a defined length in a Edit Text. (max n° of characters) in vb6 there was text.maxlength properties. thanks
hi to all There is a simple way to set a defined length in a Edit Text. (max n° of characters) in vb6 there was text.maxlength properties. thanks
LucaMs Expert Licensed User Longtime User Jun 6, 2014 #2 You could try: B4X: Sub EditText1_TextChanged (Old As String, New As String) If New.Length > 20 Then New = Old End Sub (I have not tested it but it should work) Upvote 0
You could try: B4X: Sub EditText1_TextChanged (Old As String, New As String) If New.Length > 20 Then New = Old End Sub (I have not tested it but it should work)
anallie0 Active Member Licensed User Longtime User Jun 6, 2014 #3 does not work B4X: Sub textnome_TextChanged (Old As String, New As String) If New.Length > 21 Then textnome.Text = Old End Sub so it works Upvote 0
does not work B4X: Sub textnome_TextChanged (Old As String, New As String) If New.Length > 21 Then textnome.Text = Old End Sub so it works
mangojack Expert Licensed User Longtime User Jun 7, 2014 #4 you might wish to see post #5 Here ... it should be .. B4X: If New.Length > 20 Then textnome.Text = New.Substring2(0, 20) Upvote 0
you might wish to see post #5 Here ... it should be .. B4X: If New.Length > 20 Then textnome.Text = New.Substring2(0, 20)