iOS Question problem with AdjustFontSizeToFit label property

Jack Cole

Well-Known Member
Licensed User
Longtime User
I am having a problem getting the AdjustFontSizeToFit label property to work. It does not seem to do anything. I set it in the designer and alternatively in the page resize function as below. Is there some trick to getting this to work?


B4X:
Private Sub Application_Start (Nav As NavigationController)
    'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "Page 1"
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)
    Page1.RootPanel.LoadLayout("1")
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
    Label1.AdjustFontSizeToFit=True
End Sub
 

BillMeyer

Well-Known Member
Licensed User
Longtime User
Have a look in your designer if "MultiLine" is clicked - I seem to recall that Font Resizing won't work if this is the case. I could be wrong.
 
Upvote 0

BillMeyer

Well-Known Member
Licensed User
Longtime User
Another stab in the dark - look at the problematic device under "Settings", "Display and Brightness" , "Display Zoom" - Play with these settings and then see if you get the same problem - I had a problem here with "Standard" vs "Zoomed" settings and fixed it by including the model previous's screen derivative in designer.
 
Upvote 0
Top