Resizing HBox width to fit content

actionscript-3apache-flexmxml

I have an HBox with a fixed Width and Height and a Border. In that HBox I have a viewStack with a few different views.
When the viewStack changes views, I want the HBox container to keep resizing to its content. Currently it stays at the fixed width.
Is there any way to do that with an HBox setting?

Best Answer

You have to remove all sizing on the HBox. So remove any width or percentWidth attributes. Also make sure your ViewStack is resizing first.

Related Topic