Run the example below. Click the small text button and large text
button to dynamically load small and large text dynamically. The Vbox would automatically add scrollbars to accomodate the large text. The key is in adding the minWidth="0" and minHeight="0" in the VBox. Hope this solves your problem! Sree Example: ==================================================== <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="100%" height="100%" initialize="loadSmallText();"> <mx:Script> <![CDATA[ var smallText:String = "This is small text. Ideally should not need a scrollbar" var largeText:String = "Old question, but did not find working solutions. I have a structure in a tab navigator (see below) and I would like to have the scrollbar (when needed) in a specific place. The tab contains a HBox and a Form. HBox is of fixed size and place and should always be visible - no scrollbar. The contents of the Form are created dynamically and are of various sizes and formats. The Form should have a scrollbar when needed. Now the scrollbar is always on parent container, VBox, so that the fixed-place HBox scrolls as well." function loadSmallText() { textX.text = smallText; } function loadLargeText() { textX.text = largeText; } ]]> </mx:Script> <mx:VBox width="100" height="200"> <mx:Text id="textX" /> </mx:VBox> <mx:Button label="Small Text" click="loadSmallText();" /> <mx:Button label="Large Text" click="loadLargeText();" /> </mx:Application> ==================================================== svktiilikainen wrote: Yes, tried it and it does not work. -- 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
|
- Re: [flexcoders] Re: Scrollbar placement Sreejith Unnikrishnan
- [flexcoders] Re: Scrollbar placement svktiilikainen