On 4/17/05, viraf_bankwalla [EMAIL PROTECTED] wrote:
Is it ? Your suggestion appears to work which suggests that there
are different. What is the difference ?
Let's take this scenario:
A
B
...
/B
/A
If you set B's width and height to 100%, A will try to size it to the
maximum available space -- after taking the border size, margins, and
gaps into account. So in this case A knows what it's doing. If A's
width is 200, it's not necessary that B's width will also be 200. It
can be less, depending on the border size and the margins
(left/right).
When you set B's width to 200 explicity, A needs to grow in order to
accomodate the margins and border -- unless A's width has also been
set explicitly, in which case both will be at their specified widths
and a horizontal scrollbar may appear.
Now, take the case where you're binding the two widths. A's width
already depends on B's width. In addition, you're making B's width
depend on A's width. This is bound to confuse the layout management
in Flex. I'm surprised it didn't go into some kind of an infinite
loop (so Flex is smart to handle this).
The layout algorithm in the Box container is rather complex to
explain, and I probably got some of my facts wrong in the above
paragraphs. I don't have time to look into the details right now, or
I would have told you exactly what is happening.
You shouldn't have to bother about the details. Use percent
widths/heights if you want flexible layout, else use fixed
width/height, but don't bind a child's width/height to its parent size
in this way.
--
[EMAIL PROTECTED]
http://manish.revise.org/
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/