1 Reply Latest reply on Dec 3, 2009 2:25 PM by flairjax

    Why is mx:Box not resizing?

    flairjax Level 1

      So I have a custom popup component based on mx:Box and this custom component has a treeControl in it.  I want the popup to be no more than 150 pixels in height if nothing is in it but it can expand to a maxHeight of 300 if the datagrid contains a lot of data. I can't seem to get custom:CustomPop to expand or increase size if I do this <custom:CustomPop height="150" .  And if I try this <custom:CustomPop (no height set) then the custom:CustomPop is always 300 pixels in height.  I tried to invalidateSize on custom:CustomPop when treeControl happens in the treeControl but that doesn't work either.  Sorry deadline approaching and no sleep equals can't think straight.

       

      <mx:Box
          xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/halo"
            verticalScrollPolicy="off"
             horizontalScrollPolicy="off"
          >
      </mx:Box>

       

      <custom:CustomPop height="150" maxHeight="300" width="350"> //.......extends mx:Box

           <s:Group height="100%">

                <s:VGroupheight="100%">

                     <s:Groupheight="100%">

                          <treeControl height="100%">

                          </treeControl>

                     </s:Group>

                </s:VGroup>

           </s:Group>

      </custom:CustomPop>

       

      TIA, J