Also, hboxes won't work because when possible if there's a 1 x 2 (tall)
child component I want two squareish ones beside it rather than just making
something else extra tall.

-Josh

On Thu, Jun 19, 2008 at 9:39 AM, Josh McDonald <[EMAIL PROTECTED]> wrote:

> It's a little more complicated than that, it needs to best-guess the
> correct size, and will re-order the components somewhat in order to attempt
> to make the best use of available space. I've got the initial functionality
> working, it just needs tweaks, edge case testing, and for me to figure out
> why it goes into an infinite updateDisplayList loop when it's asked to
> layout in less space than it needs ;-)
>
> Also, I'm on some other tasks this morning, but hopefully back on this one
> this afternoon, so I should have some code to look at in a day or two.
> There's very little code actually in the overriden UIComponent methods too,
> so it should be reasonably easy to port to a Layout if Adobe decide to make
> Layout part of the official API.
>
> -Josh
>
>
> On Thu, Jun 19, 2008 at 4:07 AM, sleekdigital <[EMAIL PROTECTED]>
> wrote:
>
>>   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] <flexcomponents%40yahoogroups.com>,
>> "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]
>> >
>>
>>  
>>
>
>
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]




-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to