All children are sized and positioned by their parent based on explicit
or measured width/height.  Images are extra tough because their size
isn't known at first measure since the bits aren't fully loaded yet.
Personally, I would just adjust its position when the "complete' event
fires, but I also would expect the Container to handle this
automatically.  However, I've recommended you use Canvas so then you
will have to position manually.  If you decide to stick with boxes, we
can look into this in more detail.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of droponrcll
Sent: Monday, October 01, 2007 9:02 AM
To: [email protected]
Subject: [flexcoders] Placement of Image within Image Control

 

I have an Image control that is supposed to be centered in a VBox. The 
problem is that the image file itself may be of varying dimensions and 
aspect ratios. When the image is smaller than the image control it is 
in, it is always at the top left of the image control container, 
causing it to look off center. Are there any properties on the image 
control itself that say where to position the image within its 
container?

Thanks.

 

Reply via email to