I would recommend adding a button to your app that, when you click the
button, picks the y value off a component and sets
verticalScrollPosition to it.
 
If that works then you have a timing problem with invalidation and
validation.  If not, post that example.
 
-Alex

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Monday, April 02, 2007 9:04 AM
To: [email protected]
Subject: Re: [flexcoders] "y" value of UIComponents added inside of VBox




Yes the y coordinated is coming back as number 0, yes you understood.

I would like to set a Panel verticalScrollBarPosition according to the y
coordinate of any UIComponent selected inside of Panel container.

I'm trying validateNow and validateDisplayList, no luck yet. I will keep
tooling around. You are welcome to add more suggestions.

--Keith H--

> I think the verticalScrollPosition property is actually a direct 
> mapping to
> the top viewable y pixel location so you should be able to set the 
> locationby setting verticalScrollPosition to the y coordinate. I'm 
> not sure what
> you mean by you "only get 0 for each UIComponent." If you mean 
> that the y
> coordinate is coming back as 0, then you querying the coordinate 
> before it's
> been set. Calling validateDisplayList() or validateNow() should 
> fix that
> problem if you're not calling it from inside createChildren(). 
> Tell me if I
> misunderstood you and I'll try again.
> 
> - Dan Freiman
> 
> On 02 Apr 2007 05:48:45 -0700, keith <[EMAIL PROTECTED]
<mailto:khair%40nc.rr.com> > wrote:
> >
> > Goal:
> > I want to make my verticalScrollBar scroll to the Y position of the
> > Selected UIComponent in the Flex application.
> >
> > Problem:
> > When using addChild to add UIComponents to a VBox container I'm I 
> only> get 0 for each UIComponent placed in a row down the VBox 
> container.> Maybe there is a easier way to get the 
> verticalScrollBar to scroll to
> > the selected UIComponent's y coordinate?
> >
> > -- Keith H --
> >
> > 
> >
> 


 

Reply via email to