I have put a tabbar and a viewstack inside of a panel. My goal is to have the panel resize based on the current state of the viewstack so it is just big enough to encompass it and the tabbar.
Here is a simple example which illustrates my problem: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Panel id="pan" x="246" y="173" layout="absolute" styleName="OuterPanel"> <mx:TabBar dataProvider="stack" tabHeight="33"> </mx:TabBar> <mx:ViewStack id="stack" resizeToContent="true" top="33"> <mx:Canvas label="one" width="450" height="200" backgroundColor="#000000"/> <mx:Canvas label="two" backgroundColor="#FF0000" width="700" height="500" borderStyle="solid" borderColor="#000000" borderThickness="4"> </mx:Canvas> <mx:Canvas label="three" width="200" height="200"/> </mx:ViewStack> </mx:Panel> </mx:Application> I have given the panel no width or height in the hope that it will be determined by the dimension of the children. I would also like to use contrainsts to prevent the tabbar and viewstack from being flush with the panel edge (i.e. I would like a 10 px margain all around.) Unforunately, when the panel is resized, it adds scroll bars, even though I have not requested them! Secondly, in order for the panel to resize automatically, I cannot use an absolute layout, which means my constrainsts do not work! If anyone has suggestions or can point out what I'm doing wrong here I would appreciate it very much. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

