Android Question label created in code - multiline

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
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
Back
Top