Hi Erel,
How can I set the maxlength of any textbox (edittext).
Thanks
How can I set the maxlength of any textbox (edittext).
Thanks
You will need to handle the TextChanged event. If the text is longer than x characters you should call Substring to truncate it.
Sub txtTruckNumber_TextChanged (Old As String, New As String)
If New.Length>19 Then
txtTruckNumber.text= New.SubString2(0,19)
txtTruckNumber.SelectionStart=19
EndIf
End Sub
Sub txtTruckNumber_TextChanged (Old As String, New As String)
If New.Length > 19 Then
Dim pos As Int = Codice.SelectionStart
Codice.Text = Old
Codice.SelectionStart= pos - 1
End If
End Sub