Android Question How do I set an EditText View to Italic

rgarnett1955

Active Member
Licensed User
Longtime User
Hi

The title of this posts says it all:
How do I set an EditText View to Italic

EditText to Italic:
        Dim dfe As EditText
        dfe.Initialize("DateField")
        dfe.SingleLine = True
        If dateEntered = False Then
            dfe.Typeface = ??? 'What do I put here?  Typeface.STYLE_ITALIC doesn't work
            dfe.TextColor = 0xFF696969
        Else
                
        End If

Best regards
Rob
 

klaus

Expert
Licensed User
Longtime User
B4X:
        Dim dfe As EditText
        dfe.Initialize("DateField")
        dfe.SingleLine = True
        If dateEntered = False Then
            Private tf As TypeFace
            tf = tf.CreateNew(Typeface.DEFAULT, Typeface.STYLE_ITALIC) 
            dfe.Typeface = tf 'What do I put here?  Typeface.STYLE_ITALIC doesn't work
            dfe.TextColor = 0xFF696969
        Else
                
        End If
 
Upvote 0
Top