----- Original Message ----- >From: Mark Ingram >To: flexcoders@yahoogroups.com >Sent: Wednesday, December 05, 2007 10:54 AM >Subject: RE: [flexcoders] How does Panel work in designer / layout? > > >Hi Paul, thanks for that - what if you had another container inside >TestContainer? With say a 20 pixel border around all sides. How could you >add a button to the child container >(not the parent container). > >Thanks, > >Mark
Interesting question: package com.ipauland.view { import mx.containers.Panel; public class TestPanel extends Panel { public function TestPanel() { super(); } } } package com.ipauland.view { import mx.containers.VBox; public class TestVBox extends VBox { public function TestVBox() { super(); } } } <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:cont="com.ipauland.view.*" height="404" xmlns:comp="comp.*"> <cont:TestPanel x="20" y="10" width="250" height="268"> <cont:TestVBox borderColor="0xFF0000" borderThickness="20" borderStyle="solid" x="10" y="20" > <mx:Button label="button1" /> <mx:Button label="button2" /> </cont:TestVBox> </cont:TestPanel> <mx:Panel x="296" y="10" width="250" height="268" layout="absolute"> <cont:TestVBox borderColor="0xFF0000" borderThickness="20" borderStyle="solid" x="38" y="31"> <mx:Button label="button1" /> <mx:Button label="button2" /> </cont:TestVBox> </mx:Panel> </mx:Application> Flex completely ignores the x,y position inside my TestPanel. Hmm. Paul