Android Question label created in code - multiline

Cableguy

Expert
Licensed User
Longtime User
Unlike EditText, Labels are "by default" multiline. Text is shown in the available space (label size) and wrapped if you so set the property to true
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
How to create multiline label in code in B4A and B4i ?
B4X:
Private Sub CreateLabel(EventName As String) As B4XView
    Dim lbl As Label
    lbl.Initialize(EventName)
    #If B4A
    lbl.SingleLine = False
    #Else If B4I
    lbl.Multiline = True
    #Else If B4J
    lbl.WrapText = True
    #End If
    Return lbl
End Sub
 
Upvote 0
Top