iOS Question SizeToFit

Karsten Madsen

Member
Licensed User
Hello
I have multiply place in my app Labels using Multiline.
I like to have the text starting
Two scenarioes:
Scenario 1 : Opening a designed file including a Label which is Multiline like below, the Multiline and especially the SizeToFit work perfectally.
Scenario 2 : Opening a designed file including af Label which is Multiline like below, the Multiline and especially the SizeToFit does not work

I have even tried to switch "pageExplorer" and "cardPendings" ... It only works in Scenario1.

What am I doing wrong?

Scenario1
B4X:
        pg.RootPanel.LoadLayout("pageExplorer")
        ...
        Label1.Text = "putting som text here"

Scenario2
B4X:
                clvPendingFitMates.Add(CI2(clvPendingFitMates.AsView.Width, 120dip, tclv, l, image),i)

private Sub CI2(w As Int, h As Int, t As String, fn As String, image As String) As Panel
    p2.LoadLayout("cardPendings")
    ...
    Label1.Text = "putting som text here"
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…