iOS Question B4i TextChanged event on TextField

mtechteam

Member
Licensed User
Longtime User
I am attempting to limit the number of characters to input to 10 characters.

I am using the following code which works fine on B4a, but not B4i:

Text Changed Event:
Public Sub txtOrgID_TextChanged(Old As String, New As String)
    If New.Length > 10 Then
        txtOrgID.Text = Old
    End If
End Sub


If I show in a log file the value of txtOrgID.Text, it has not changed yet and matches the Old value, and the New Value is shown on the phone regardless of whether the size exceed 10 characters or not.
 
Top