I’m having a few MobileLabel controls in a MobileContainer. The MobileLabels all have the auto-layout constraint Height set to >= 10, which is a Min constraint. This doesn’t work as all MobileLabel heights are way higher than they should be. It’s only like that when I use the MobileContainer. Putting a MobileLabel control in a MobileScreen the Min Height constraint works fine.
Does anybody experience the same thing?
an example project showing the problem would be very helpful
I’m having the same problem. MobileLabels don’t automatically resize inside mobilecontainers like they do in a MobileScreen.
https://mark-sweeney.com/XojoExamples/MobileLayout.xojo_binary_project.zip
Actually, from the example posted by @Mark_Sweeney it is not really a bug. At least I do not see it that way.
When setting the ScrollableArea.container
Xojo or iOS will automatically create the Top, Bottom, Leading, Trailing constraints:
Screenshot from Revealapp
It is also important to set at least one more constraint such as the Width:
Var newContainer As new ContainerMobileLable
ScrollableArea1.Container = newContainer
// Setting the width of the container inside the scrollable area
Var width As New iOSLayoutConstraint(newContainer, _
iOSLayoutConstraint.AttributeTypes.Width, _
iOSLayoutConstraint.RelationTypes.Equal, _
ScrollableArea1, iOSLayoutConstraint.AttributeTypes.Width, _
1.0, 0, 1000)
ScrollableArea1.AddConstraint(width)
Result:
Screenshot from Revealapp
Screenshot from Simulator