Can’t seem to get this correct.
So if I want to set the constraint of the imagewell in the container to the scrollable area width and if I use the following to define the right of the imagewell. What would the syntax be? I’ve looked but can’t see an example I can adapt
Dim right As New iOSLayoutConstraint(me, _
iOSLayoutConstraint.AttributeTypes.Right, _
iOSLayoutConstraint.RelationTypes.Equal, _
Self, iOSLayoutConstraint.AttributeTypes.Right, _
1.0, iOSLayoutConstraint.StandardGap)
I’ve done this successfully with an iOSCustomTableCell to adjust the height of the cell, using the technique in the example project included with Xojo (can’t remember the name of the example project).
The label I add the height constraint to doesn’t have the height defined as a constraint in the IDE. Otherwise you’d have 2 conflicting constraints. Maybe that’s the problem.
I had success doing that also making some customtablecells variations for iPhone vs iPad which worked well but I’m just not getting it. I’ll just keep trying to adapt the examples
Not quite there. The textfield and text area are now bound to the width of the scrollarea but I am still having trouble with the Imagewell, most likely because I have defined its height as 35% of the parent screen height which worked fine b4 I made it scrollable. How can I define the height of the imagewell that is in the container to be 35% of the device height?
Actually that’s correct @Christoph_Emrich Ahh I left some test data in the container controls so I wasn’t seeing the instance created which was masking to some extent the constraint effect
Dim c2 As new LargeContainer
//set the data for the container
c2.ImageView1.Image = Unknown
c2.TextArea1.text = InfoText
//add the container
me.AddControl(c2)
//Set the constraint to tie the container to the scrollablearea width
Dim cons as iOSLayoutConstraint
cons = new iOSLayoutConstraint(c2.Control(1), _
iOSLayoutConstraint.AttributeTypes.Width, _
iOSLayoutConstraint.RelationTypes.Equal, _
ScrollableArea1, _
iOSLayoutConstraint.AttributeTypes.Width, _
1.0, 0)
If you are adding different amount of text to text field in a scrollable area how do you eliminate the white space at the bottom of the area. I suppose that is asking are there any tricks to setting up the scrollable area and controls within?