2 Replies Latest reply on Aug 19, 2010 12:00 AM by Shongrunden

    Break container out of layout

    FredericCox Level 1

      Hi,

       

      Suppose we have some HGroups inside of a VGroup container like the code below:

      <s:VGroup>
                <s:HGroup>
                     <mx:Canvas backgroundColor="red" width="170" height="170" />
                     <mx:Canvas backgroundColor="blue" width="600" height="170" />
                     <mx:Canvas backgroundColor="red" width="170" height="170" />
                </s:HGroup>
                <s:HGroup>
                     <mx:Canvas backgroundColor="red" width="170" height="338" />
                     <mx:Canvas id="contentScreen" click="expandContentScreen();" backgroundColor="black" width="600" height="338" />
                     <mx:Canvas backgroundColor="red" width="170" height="338" />
                </s:HGroup>
                <s:HGroup>
                     <mx:Canvas backgroundColor="red" width="170" height="170" />
                     <mx:Canvas backgroundColor="blue" width="600" height="170" />
                     <mx:Canvas backgroundColor="red" width="170" height="170" />
                </s:HGroup>
           </s:VGroup>
      

       

      How can I expand the content screen so that it " breaks out of " the layout and comes on top of the other items? So basically I want to:

       

      1) Increase the size of the contentScreen

      2) Alter the position (so against the defaults of the HGroup)

      3) Appear on top of all the other items in the VGroup

       

      And I want this to happen when I click a button and want to be able to undo it so that it is back into the start

       

      The problem I'm facing is that in some cases the contentscreen needs to be bigger but all other items should remain in position. I tried with postLayoutTransform but that doesn't seem to work. Any idea?