1 Reply Latest reply on Aug 17, 2011 2:26 PM by Flex harUI

    General Layout Question

    broconne

      How do I constrain a particular object to a panel or group?

       

      I have a panel that I set to be 45% of the height of its parent:

      <s:Panel id="infoPanel" height="45%" width="100%" creationComplete="{hidePanelHeader(event)}" backgroundColor="0x000000">

       

      Inside that I have another panel which should be 100% the height of its parent (infoPanel):

      <s:Panel height="100%" width="35%" backgroundColor="0x000000" title="Instance Status" cornerRadius="5"
                                     borderVisible="true" borderColor="gray" id="instanceStatusPanel">
           <s:layout>
           <s:TileLayout>
                <s:requestedColumnCount>2</s:requestedColumnCount>
                <s:requestedRowCount>2</s:requestedRowCount>
                <s:columnAlign>justifyUsingWidth</s:columnAlign>
                     <s:rowAlign>justifyUsingHeight</s:rowAlign>                                        
           </s:TileLayout>
           </s:layout>
      

       

      I am tile layout for the components of that second panel.  Inside that panel I add 4 components.  If I keep the infoPanel's height at 45% the bottom two components leak out of the infoPanels 45% height and cover up objects in the panel below the infoPanel.  If I make the panel's height 50% that does not happen.  What I want to do is set the infoPanels height to 45% and then have it automatically scale the objects inside of it make them fit.  How can I acheive that?

       

      Thanks