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]> 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] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Sandeep Malik
> *Sent:* Friday, September 21, 2007 6:57 AM
> *To:* [email protected]
> *Subject:* [flexcoders] Re: Real size of components
>
>
>
> I guess you should use getExplicitOrMeasuredWidth() and
> getExplicitOrMeasuredHeight().
>
> Regards,
> Sandeep
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "
> ben.clinkinbeard"
> <[EMAIL PROTECTED]> wrote:
> >
> > measuredWidth and measuredHeight I think.
> >
> >
> > --- In [email protected] <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

Reply via email to