Alex, Thanks - I think that approach will require me to build multiple subgrids and treat each of these subgrid as a separate griditem - thus creating additional nesting, rather than 1 large grid. I was hoping for to avoid that - is there any other way to accomplish this (I suspect not).
Thx again, Patrick --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > myGridItem.setStyle("borderStyle", "solid") > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of pbrendanc > Sent: Friday, June 27, 2008 2:50 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Create border for inner subgrids within a grid - > How? > > > > Another noob question - I've created a dynamic (n*n) grid and need to > provide some visual delineation of the inner grids - e.g. a 4*4 grid > contains 4 inner 2*2 subgrids. > > How can I create a border around each of these subgrids? (This will > also need to be done dynamically). > > TIA, > Patrick > > FWIW - The grid is built with the following function > > private function buildGrid (nrows:uint,ncols:uint):void { > > for (var i:Number = 0; i<nrows; i++) { > var myGridRow:GridRow = new GridRow(); > // for each col add child controls > for (var j:Number = 0; j<ncols; j++) { > var myGridItem:GridItem = new GridItem(); > myGridItem.addChild (myBtn); > //Add cell to row > myGridRow.addChild (myGridItem); > } // end col loop > > // Add row to grid > myGrid.addChild(myGridRow); > } > // Add grid to parent container (canvas/form/panel > etc??) > mypanel.addChild(myGrid); > } >