1 Reply Latest reply on Jul 8, 2010 9:51 AM by David_F57

    Need BorderContainer to fit contents...

    EvolvedDSM Level 2

      BorderContainer seems to have a default width and height.  Putting items inside this container does nothing.  I have only been able to manually adjust the WxH parameters to fit its contents.  This is unacceptable though as the contents are dynamic and may need to grow larger or smaller than the manual parameters I've set.

       

      Is there a way to auto-size BorderContainer to fit its contents?  Or is there a better alternative?  I am not against going back to HBOX/VBOX, but with Flex 4 framework, these spark components should work BETTER than the old stuff. 

        • 1. Re: Need BorderContainer to fit contents...
          David_F57 Level 5

          hi,

           

          <s:BorderContainer x="119" y="58" minHeight="10" minWidth="10">

          </s:BorderContainer>

           

          by doing this any component you add will resize the container to fit around children

           

          or if you want a layout

           

          <s:BorderContainer x="119" y="58" minHeight="10" minWidth="10">

          <s:layout>

            <s:VerticalLayout/>

          </s:layout>

          </s:BorderContainer>

          David.