Edit text Hint size

anaylor01

Well-Known Member
Licensed User
Longtime User
I want the hint in the edit text box to be large and centered and then when the edit text box receives focus the text is smaller and left aligned. Can this be done?
 

yuval

Member
Licensed User
Longtime User
you can do something like this:
make the textbox small at start, and then make it larger when user enters data.

Sub txtMsg_TextChanged (Old As String, New As String)
Dim txt As EditText
txt = Sender
doForSizeHint(New, txt)

End Sub

Sub doForSizeHint ( s As String , aTextBox As EditText )
If s.Length = 0 Then
aTextBox.TextSize = 16
Else
aTextBox.TextSize = 32
End If
DoEvents
End Sub
 
Upvote 0
Top