iOS Question [B4X] [SOLVED] wrap text on buttons in B4XDialog?

MrKim

Well-Known Member
Licensed User
Longtime User
I am using a custom B4XDialog. The text wraps just fine on B4A but not on B4i.
I tried
B4X:
        Dim B As B4XView = MyDlg.GetButton(xui.DialogResponse_Positive)
        B.As(Button).CustomLabel.Multiline = True
But it throws an error:
B4X:
 Expected: UIButton, object type: UILabel
Is there way to get Multiline buttons in ios in the B4XDialog?
 

MrKim

Well-Known Member
Licensed User
Longtime User
GetButton returns Label. Means,
B4X:
    #If B4i
    B.As(Label).Multiline = True
    #Else
    B.As(Button).CustomLabel.Multiline = True
    #End If
This is all that is needed. B.As(Button).CustomLabel.Multiline does NOT work in B4J, and in my case it is not needed anyway as there is plenty of room so there is no need to wrap. In B4A the property seems to be already set.
B4X:
#If B4i
    B.As(Label).Multiline = True
#End If

Thank you for the help.
 
Last edited:
Upvote 0
Top