Avg. Rating 4.0

Problem

Child components of containers like VBox/HBox take up space even when visible is set to false. How do I prevent this?

Solution

Set the includeInLayout property also to false

Detailed explanation

When a component’s visible property is set to false, it is just hidden from the user. Parent container still considers the component while computing the layout and renders the component along with other child components. If you want to hide a component from the user and also make sure it is not included in the layout, set the includeInLayout property to false.

Please find more details on this property at this URL http://livedocs.adobe.com/flex/3/langref/mx/core/UIComponent.html#includeInLayout

Report abuse

Related recipes