Please read up on the component life cycle. It is too lengthy for me to present here. Scrollbars are added before updateComplete. ValidateNow just forces updateComplete to happen sooner.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Sent: Tuesday, November 20, 2007 2:06 PM To: [email protected] Subject: [flexcoders] Re: When are scrollbars added? question on timing of initial rendering So it sounds like updateComplete event is fired anyway, is that correct? Would the scrollbars be added during that event, or during the validateNow()? I'm often adding a bunch of small images at one time, I don't see any slowdown. Unless the updateComplete/validation isn't done until my method stack completes. Is that the case? --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > There's a whole validation sequence after you call addChild. Theres an > updateComplete event when done, and you can force it by calling > validatenow(), but that can be expensive. > > > > ________________________________ > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of Brian > Sent: Tuesday, November 20, 2007 12:25 PM > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] When are scrollbars added? question on timing of > initial rendering > > > > I have a Canvas object that I am dynamically adding images to in a > method that is called via Application.creationComplete(). Sometimes > the addition of these images results in clipping and the creation of > scrollbars, so I'm checking the position of a certain image to see if > it's in the viewable area. > > However, it seems like the scrollbars have not yet been added to the > canvas at the time I am checking for them, which is immediately after > I've added the images. I'm assuming it's some kind of rendering timing > issue, like I'm still within the method stack so it doesn't render the > canvas with the new objects yet. > > Is there a way to force the scrollbars to be added? >

