title: Is there any collapsible flex container that can handle dynamic content that works when pre-collapsed?
body: <p>Do you know any collapsible flex container that can handle dynamic content that works when pre-collapsed?</p>
  
  <p>I tried the CollapsiblePanel component by Arc90 for Flex, but it did not work when pre-collapsed.</p>
  
  <p>If I have a VBox inside the panel, and I set the "collapsed" property of the CollapsiblePanel to true, the size of the CollapsiblePanel cannot be restored. It seems like this is what is happening:</p>
  
  <ol>
  <li>The CollapsiblePanel's collapsed property is pre-set to true in the MXML markup.</li>
  <li>The VBox auto-adjusts its height to 0 since the CollapsiblePanel is collapsed.</li>
  <li>When the CollapsiblePanel's collapsed property changes to false (i.e., it is expanded by the user), the VBox does not expand itself because its parent's content area is 0.</li>
  <li>Therefore the CollapsiblePanel remains at the same height because its content's height is 0.</li>
  <li>Therefore...</li>
  </ol>
  
  <p><strong>Note: This occurs only when the CollapsiblePanel is pre-collapsed, as seen in the markup below.</strong></p>
  
  <p>I've already tried this (didn't work):</p>
  
  <pre><code>    &lt;containers:CollapsiblePanel minimize="pnl_minimize(event)" 
  restore="pnl_restore(event)" height="100%" width="100%" collapsed="true"&gt;
      &lt;mx:VBox width="100%" height="100%" verticalGap="0"&gt;
         &lt;mx:LinkButton id="lnkSales1" label="Sales 1" /&gt;
         &lt;mx:LinkButton id="lnkSales2" label="Sales 2" /&gt;
      &lt;/mx:VBox&gt;
      &lt;/containers:CollapsiblePanel&gt;
  
   private function pnl_restore(event:Event):void
  {
      var objPanel:CollapsiblePanel = event.target as CollapsiblePanel;
      var objChildArray:Array = objPanel.getChildren();
      for each (var obj:Object in objChildArray)
      {
         obj.invalidateSize();
      }
      objPanel.invalidateSize();
  }
  </code></pre>
  
  <p>Is there anyone who has succeeded in doing something like this? What component did you use?</p>