Use validateNow() or validateClient().  ValidateSize is for internal use
by the framework and calling it by itself isn't guaranteed to work.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Arpit Mathur
Sent: Saturday, September 22, 2007 11:49 AM
To: [email protected]
Subject: Re: [flexcoders] Re: Real size of components

 

Would this work?

 

component.percentWidth = 50

component.percentHeight = 50

component.validateSize()

trace(component.measuredWidth)

 

I have never really used the validation thing so I am curious. Its how I
would imagine it would work.



 

On 9/21/07, Gordon Smith <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
wrote: 

It sounds like you are expecting to set percentWidth and immediately
have the width change. Flex visual components don't work like this.
Typically when you set properties, the component enters a kind of
"invalid" state until the LayoutManager updates it. If you wait until
the component dispatches an updateComplete event, the width should then
be correct.

 

- Gordon


 

________________________________

From: [email protected] <http://ups.com/>  [mailto: flexcoders@
<mailto:flexcoders@> yahoogroups.com <http://yahoogroups.com> ] On
Behalf Of Sandeep Malik
Sent: Friday, September 21, 2007 6:57 AM
To: [EMAIL PROTECTED] ups.com <http://ups.com/> 
Subject: [flexcoders] Re: Real size of components

 

I guess you should use getExplicitOrMeasuredWidth() and
getExplicitOrMeasuredHeight().

Regards,
Sandeep

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> measuredWidth and measuredHeight I think.
> 
> 
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> , "Daniel" <danielterraza@> wrote:
> >
> > Hey guys...
> > 
> > I'm setting the size of a panel through the percentWidth property,
but
> > when I ask for the width of the component it doesn't give me the
real
> > size... How can I know the real size when I set width and height
> > through percentage?
> > 
> > Thanx, 
> > DaNooB.
> >
>




-- 
Arpit Mathur
Lead Software Engineer, 
Comcast Interactive Media
---------------------------------------
post your flex tips on 
http://flextips.corank.com <http://flextips.corank.com>  

 

Reply via email to