Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
[101] measured width vs. explicit width vs. width   Message List  
Reply | Forward Message #139745 of 151032 |
RE: [flexcoders] [101] measured width vs. explicit width vs. width

Yes, this is close.

 

The measure() method typically sets the measuredWidth and measuredHeight based on how much room a component needs to display its information. For example, a Button computes its measured size to be just large enough to display its label String. An HBox computes its measured size to be just large enough to display all of its children. Etc.

 

In addition to the measuredWidth and the explicitWidth, there is also a percentWidth. These are conceptually the three "inputs" that determine the actual width as the output of the layout process. The actual width is not known until the component has undergone a LayoutManager pass.

 

For historical reasons related to ease-of-use consideration, the "width" property does double duty. As a setter, it sets the explicitWidth. As a getter, it returns the actual width.

 

Gordon Smith

Adobe Flex SDK Team

 

From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of gwangdesign
Sent: Wednesday, March 25, 2009 8:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] [101] measured width vs. explicit width vs. width

 

Hi,

This is a really basic question about UIComponent. My understanding is that:

1. "measuredWidth" is the default or suggested or "appropriate" width that a (subclassing) UIComponent asks for itself;

2. "explicit width" is the value you set explicitly to the "width" property of the component;

3. "width" is the real or final width as the component gets drawn to the screen *after* the displaylist gets updated. This value is either the "explicit width" as the developer sets it, or something that the container ("parent") components finally determine based on the "measuredWidth" the component asked for and other factors such as the real estate available for it.

Is this something close to the truth/rules?

Please advice and/or correct. Thanks.



Thu Mar 26, 2009 12:21 am

gsmithsf
Online Now Online Now
Send Email Send Email

Forward
Message #139745 of 151032 |
Expand Messages Author Sort by Date

Hi, This is a really basic question about UIComponent. My understanding is that: 1. "measuredWidth" is the default or suggested or "appropriate" width that a...
gwangdesign
Offline Send Email
Mar 25, 2009
4:13 pm

Yes, this is close. The measure() method typically sets the measuredWidth and measuredHeight based on how much room a component needs to display its...
Gordon Smith
gsmithsf
Online Now Send Email
Mar 26, 2009
12:23 am

Thanks Gordon for the clarification. Authority's guide is always appreciated!...
gwangdesign
Offline Send Email
Mar 26, 2009
9:22 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help