3 Replies Latest reply on Nov 22, 2010 12:10 AM by Manystems-Arjen

    SkinnableContainer constraints

    Manystems-Arjen Level 1

      Hello,

       

      If i'm understanding the constraints correctly it should be posisble to resize a container to its parent using the Left&Right constraints.

      I've build an sample app with the following structure

      container

           headerContainer

                Rect (just to make the container vissible)

                label

           columnContainer

                Rect (just to make the container vissible)

                Button

       

      the column container conains a button with a large text.

      I want the header to have the same length as the column so i've set the left and right to 0.

      The problem is that the header is not stretching to the size of the column.

      When i set the wdth to 100% it does stretch.

      Setting the width to 100% should be the same as setting left and right to 0 right?

       

      image with only left and right:

      testWithLeftAndRight.png

      image with the width 100%

      testWithWidth.png