a quick solution :
<mx:ViewStack width="{vbox.selectedIndex == 0 ? 200 : 500}" id="vbox" />
bjorn - wrote On 01/29/2008 02:56 PM:
> I've got three ButtonBars in a ViewStack, but this doesn't seem to
> work too well.
>
> The problem is that if I don't specify a height on the ViewStack all
> the ButtonBar's take the height of the first one. If the first one
> only has two elements while the next ones have ten, that's a problem.
>
> If I do specify a height the first one doesn't look good since it will
> add spacing between the two buttons to make it fill the whole height.
>
> I also tried calling .invalidateSize() on the selected ButtonBar to
> make it resize itself but to no avail ..
>
> Can I tell it to align at top or something with less spacing between
> each button? (verticalAlign=top didn't do much ..)
>
> --
>
> ========================
> http://www.juicability.com <http://www.juicability.com> - flex blog
> http://www.43min.com <http://www.43min.com> - funny movies
>