When the LayoutManager sizes a component,
it considers three inputs (measuredWidth, percentWidth, and explicitWidth) --
and produces one output (width). The measuredWidth is the component's own
notion of how big it should be by default. You don't set the measuredWidth; it
is up to the component to do this itself in its measure() method. For example,
a Button automatically sets its measuredWidth to be just big enough to display
its label. If you want to override the measuredWidth
so that the component's output width is a percentage of its parent's available
width, set percentWidth. Setting the 'width' to a percent (which you can do in
MXML but not in AS) is simply a shorthand for setting the percentWidth. When
the LayoutManager computes the output width based on the percentWidth, it will
take the minWidth into account. If you want to override the measuredWidth
so that the component's output width is a fixed number of pixels, set
explicitWidth. Setting the 'width' to a number of pixels is simply a shorthand
for setting the explicitWidth. - Gordon From: Does anyone know of a good (reasonably plain language)
writeup of how -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|