Fixed size container
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> private function logSizes():void { trace("HBox: "+ hb1.width); trace("Label: "+ lb1.width); trace("Image: "+ img1.width); trace("Button: "+ b1.width); } </mx:Script> <mx:HBox width="100%"> <mx:HBox id="hb1" width="40%" borderStyle="solid"> <mx:Label id="lb1" text="Hello" width="50" /> <mx:Image id="img1" source="@Embed(source='logo.jpg')" width="60%" /> <mx:Button id="b1" label="Button" width="40%" click="logSizes();" /> </mx:HBox> <mx:HBox width="260" borderStyle="solid"> <mx:Label text="Hello" width="50" /> <mx:Image source="@Embed(source='logo.jpg')" width="119" /> <mx:Button label="Button" /> </mx:HBox> </mx:HBox> </mx:Application>