Hi. I have a <mx:Panel> that I want to only be visible when a button is clicked. I know i can set the visible property to false but and then to true when the button is clicked but i was wondering if there is a better way like if you can add the control and then remove it like addChild() and removeChild().
IMHO, addChild() and removeChild() is more expensive operation, than setting visible to true/false but you also need to set includeInLayout to same value as visible so you dont get a empty blank area showing up.
with thease two propertes you get exact same behaviour (visually) as adding and removing child but with performance bost.