1 Reply Latest reply on Sep 30, 2010 12:26 PM by Lee Bock

    Sizing problem with child BorderContainers

    Tim John



      This was going to be a question, but in writing I have discovered the answer. Take this example:


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                        xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
           <s:Group height="50">
                <s:BorderContainer height="100%"/>


      You may be surprised to see that when rendered, the BorderContainer is larger than its parent despite being explicitly set at 100% height. 112 pixels to be precise.


      Well, this is because BorderContainer's default properties include a minWidth and minHeight of 112 pixels, so if you want total flexibility, set these values to 0.


      I hope others with the same infuriating problem will benefit from this post!