Hi,

Why doesn't a parent container automatically resize when adding an element 
bigger than its width/heigth?
Isn't this considered the default behavior?

Here is my sample:

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" >        
        <s:layout>
                <s:VerticalLayout gap="10" />
        </s:layout>
        
        <fx:Script>
                <![CDATA[
                        import spark.components.BorderContainer;
                        import spark.components.Button;
                                
                        protected function clickHandler(event:MouseEvent):void {
                                var child:spark.components.Button = new 
spark.components.Button();
                                child.label = "Loooooooooooooog Label";
                                
                                container.addElement(child);
                        }
                ]]>
        </fx:Script>
                                        
        <s:Button label="Add Button" click="clickHandler(event)" />   
        <s:VGroup id="container" width="50" height="50" />          
        
</s:Application>

Reply via email to