I made Erel's Proper (Title) case work with a b4xFloatTextField using this:
(Set the event name to b4XFloat on any Proper case text fields)
Sub b4xFloat_TextChanged (Old As String, New As String)
If New.ToLowerCase <> Old.ToLowerCase Then 'this makes it only fire once
Dim b4xView As B4XFloatTextField
b4xView = Sender
Dim edtText As EditText
edtText = b4xView.TextField
edtText.Text = TitleCase(New)
edtText.SelectionStart = edtText.Text.Length
End If
End Sub
I have to set the SelectionStart to the end or it will add characters in reverse order within the TitleCase...
It works for me, but I'd be very interested in better methods...
Rusty
P.S. I commented out this line in the TitleCase function to allow embedded upper case like "McDonald"
' s = s.ToLowerCase