Propercase

doogal

Member
Licensed User
Longtime User
Is there a workaround for shiftlock? I found this code from Erel and it works as expected except for the shiftlock, ex. I can't easily type three consecutive letters "ABC".

B4X:
Sub EditText1_TextChanged (Old As String, New As String)
   If ignoreNextTextChangedEvent = True Then
        ignoreNextTextChangedEvent = False
        Return
    End If
    If New.Length > 0 Then
        Dim s As String
        s = New.SubString2(0, 1).ToUpperCase & New.SubString(1)
        ignoreNextTextChangedEvent = True
        EditText1.Text = s
        EditText1.SelectionStart = EditText1.Text.Length
    End If
End Sub
:BangHead:
 
Top