Thanks for the response, droponrcll. 

Actually, if I just had the VBox only that would have been fine, but my VBox is 
actually an itemRenderer for a List control. The List control is automatically 
scaling the width and height of the VBox to 100% of the List controls' row.

Any idea how to get around this? Thanks.




--- In flexcoders@yahoogroups.com, "Amy" <amyblankens...@...> wrote:
>
> --- In flexcoders@yahoogroups.com, "lambovell" <lambovell@> wrote:
> >
> > The class below is being used as a custom itemRenderer, and I want to set 
> > the height of the VBox to that of its contents (children).
> >  
> > public class MyDynamicLayout extends VBox
> >     {
> >   // .. code removed for brevity
> >  
> > override protected function measure():void 
> >         {            
> >         super.measure();
> >          // measuredHeight = height = ?;// I want to calculate the height 
> > of all the children and set the height of this VBox to that height of all 
> > the children combined.
> >         }
> > }
> 
> I think that the default measure method of VBox makes it just big enough for 
> its children + all padding and vertical gaps.  So just leave off width and 
> height, and you should have it.
>


Reply via email to