--- In [email protected], "lambovell" <lambov...@...> 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