I am playing with 2019R1.1 in an attempt to see if I can use Xojo instead of the iOS product created by the publisher of the Android basic I used until now.
I am trying to create a custom control by placing an iOSTextField and an iOSLine inside an iOSContainerControl. I need the controls inside to follow the width of that container on the view.
If that was in Desktop (or that other Basic I was referring to), I would simply do something like :
TextField1.Width = me.width
Line1.width = me.width
Simple enough, right ? Except in Xojo iOS, for some reason (?), width is read only
I tried to use the example of the LR at documentation.xojo.com
[code]Dim right As New iOSLayoutConstraint(TextField1, _
iOSLayoutConstraint.AttributeTypes.Right, _
iOSLayoutConstraint.RelationTypes.Equal, _
Self, iOSLayoutConstraint.AttributeTypes.Right, _
1.0, iOSLayoutConstraint.StandardGap, 1000)
Dim rightLine As New iOSLayoutConstraint(Line1, _
iOSLayoutConstraint.AttributeTypes.Right, _
iOSLayoutConstraint.RelationTypes.Equal, _
self, iOSLayoutConstraint.AttributeTypes.Right, _
1.0, iOSLayoutConstraint.StandardGap, 1000)[/code]
But it simply does nothing in a 1000 ms single timer when the width of the CC exists (it is zero in Open).
Why so much complexity when allowing a direct setting of Width would have done just fine ?