Android Question Maxlength properties in Edit Text

anallie0

Active Member
Licensed User
Longtime User
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
 
does not work

Code: Copy
Sub textnome_TextChanged (Old As String, New As String)

If New.Length > 21 Then textnome.Text = Old
  
End Sub

so it works
 
Upvote 0
you might wish to see post #5 Here ...

it should be ..
Code: Copy
If New.Length > 20 Then textnome.Text = New.Substring2(0, 20)
 
Upvote 0
Back
Top