Android Question How do I limit the maxlength on a edit box?

davepamn

Active Member
Licensed User
I am looking for a maxlength property to set on a textbox. Is edit box maxlength set by api or by event down character counting?
 
Last edited:

DonManfred

Expert
Licensed User
Is edit box maxlength set by api or by event down character counting
event down character counting. There is no api. But maybe there is a library which replaces the normal edittext with a custom one. Maybe you can limit the length with this library.
 

davepamn

Active Member
Licensed User
It seems like an attribute called maxlength should be made available.

B4X:
Sub txtGrower_TextChanged (Old As String, New As String)

    If New.Length>4 Then txtGrower.Text=Old

end sub
 
Top