Alex... I've tested it out and it works nicely... Thanks again! No I just need to learn about animated transistions so it's bounces between the sizes... :-)
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" styleName="plain"> <mx:Script> <![CDATA[ private function resizeDG(objDG:DataGrid):void{ if(objDG.rowCount < 12) objDG.rowCount = 12; else objDG.rowCount = 6; } ]]> </mx:Script> <mx:VBox x="10" y="10" height="100%"> <mx:DataGrid id="DG1"> <mx:columns> <mx:DataGridColumn headerText="Column 1" dataField="col1"/> <mx:DataGridColumn headerText="Column 2" dataField="col2"/> <mx:DataGridColumn headerText="Column 3" dataField="col3"/> </mx:columns> </mx:DataGrid> <mx:Button label="Button" id="button1" click="resizeDG(DG1);"/> <mx:DataGrid id="DG2"> <mx:columns> <mx:DataGridColumn headerText="Column 1" dataField="col1"/> <mx:DataGridColumn headerText="Column 2" dataField="col2"/> <mx:DataGridColumn headerText="Column 3" dataField="col3"/> </mx:columns> </mx:DataGrid> <mx:Button label="Button" id="button2" click="resizeDG(DG2);"/> </mx:VBox> </mx:Application> 2009/8/20 Nick Middleweek <n...@middleweek.co.uk> > Alex, > > Awesome, that makes total sense now! of course, the VBox will naturally > flow the objects downwards... > > Thanks!!! :-) > > > > > > > 2009/8/20 Alex Harui <aha...@adobe.com> > > >> >> Should just be VBox with 5 DG’s in it. Set rowCount to change its size. >> >> >> >> Alex Harui >> >> Flex SDK Developer >> >> Adobe Systems Inc. <http://www.adobe.com/> >> >> Blog: http://blogs.adobe.com/aharui >> >> >> >> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On >> Behalf Of *Nick Middleweek >> *Sent:* Wednesday, August 19, 2009 1:20 PM >> *To:* flexcoders@yahoogroups.com >> *Subject:* [flexcoders] 5 Datagrids ontop of each other, one resizes and >> the ones below shift up or down? >> >> >> >> >> >> Hi guys, >> >> Excuse the subject of this post :-) But it does sum up what I'm trying to >> achieve. >> >> I want to have 5 DataGrids ontop of each other in a vertical arrangement >> (A bit like the rows in Excel are ontop of each). >> >> In the bottom right of each DG, I want a little button that when clicked, >> expands/ collapses it's DG. >> >> When e.g. DG_2 is expanded, I want DG_1 to remain where it is but DG_3, >> DG_4 and DG_5 to shunt downwards and DG_2 will be expanded down to say ten >> rows. >> >> What is the best way to achieve this? Or should I be looking into >> DividedBox components? Or does the Tile Component help me? >> >> Or do I write it all myself using maths and do the resizing using top and >> bottom properties of the DG's? >> >> >> Thanks for any help... >> >> >> Nick >> >> >> > >