Using constraint-based layout with content sizing, is there an easy 
way to have a child span columns (or rows) without resizing the child?

As an oversimplified example, I have a 2x2 grid:

* In each "cell" of the first row, I have a child.

* In the second row, I want to center (or otherwise align) a child 
within the span of both columns.

* The sizes of the children vary frequently in response to user input.

Originally, I had thought to try something like this:

<mx:MyCenteredChild left="col1:0" right="col2:0" top="row2:0" 
width="n"/>

But, of course, this resizes the child to the width of both columns, 
which I do not want.

I suppose I could have the thing layout without MyCenteredChild, then 
get the column widths it calculated, and then have it lay itself out 
again, this time adding MyCenteredChild with the exact left and right 
offsets that I need.  But this feels overwrought.

I guess I could also center the child in a container that was allowed 
to stretch to fill both columns, but I'd rather not have to add more 
components to get this to work.

For other reasons, I'd prefer not to use the Grid container.

I feel like I'm missing something obvious.  I'd be grateful for any 
help!




Reply via email to