Couldn't you just make a VBox subclass and have it add HBoxes for the rows? But maybe I'm missing something in the requirements you describe. If not, I suppose the approach Mike described would result in a little less overhead, but a VBox that adds Hboxes might be something to consider.
--- In [email protected], "Josh McDonald" <[EMAIL PROTECTED]> wrote: > > Hey guys, > > About to build this based on a Container (with nested Grids perhaps?), but > if there's something out there that's a closer starting point I don't wanna > completely re-invent the wheel :) Here's what I need to do: > > I need to layout a bunch of rectangular components in something resembling a > 2 x n grid, but with flexible cell widths per row, ie everything lines up > horizontally, not necessarily vertically. > > Components are added to the container without any sizing / positioning info, > and the container does all the measuring and positioning to make the best > possible use of the space available > > If I've got 2 components of size 1x1, and one that's 1x2, I want the two > square ones on the left, and the long one on the right to make a 2x2 grid > > Rows of variable height, but every component in a row must be expanded to > fit that height > > Each row takes up the complete width of the widest row - if two components > in a row are each < width / 2, they'll be expanded to width / 2 each. > > If two "squareish" components are together less than one row width, but one > is > row width / 2, the smaller one will be made wider to keep things > looking neat. > > Only vertical scrolling, and only if necessary. I know, it can mean double > ups on measure() etc, and the Adobe guys clearly disagree with me, but as > far as I'm concerned it's the only acceptable solution UX-wise. > > Does something close to this exist, that I can base my component on? If not, > will it be of any use to the community when I'm done? It's probably the kind > of thing I can easily get the OK from the boss to open source. > > Cheers, > -Josh > > -- > "Therefore, send not to know For whom the bell tolls. It tolls for thee." > > :: Josh 'G-Funk' McDonald > :: 0437 221 380 :: [EMAIL PROTECTED] >
