I am using flex’s layout feature to avoid the coding to align/position. How ever, it looks like though I hide (visible = false) any object, flex treats it as exists and doesn’t re-align or re-position the controls as I expected.
I think, I can achieve it if I can add/remove the controls dynamically but I dont want to do that.
Does flex has the feature to ignore the invisible control and align the visibile controls only?
Below is the scenario
I have a with two in it. Either “any one” or “both” the buttons will be visible depending on the logic. No problem if I have to show both the buttons because they will be properly aligned. But if I have to show only one, the positions remain same as if both are visible.
Is there any way exists to re-align the controls when I hide/show something dynamically? That without having to add/remove
<s:Group width="100%" id="pricesGroup">
<s:layout>
<s:HorizontalLayout gap="5"/>
</s:layout>
<s:Button id="btnCoins" label="{coins.toString()}" chromeColor="#94E749"/>
<s:Button id="btnFlux" label="{flux.toString()}" chromeColor="#3B8DC7"/>
</s:Group>
You need to also mark the component out of the layout
if not, the component will keep reserved some space in the layout.