I tried validateNow() with no success, unfortunately.


On 5/4/07, Manish Jethani <[EMAIL PROTECTED]> wrote:

  On 5/2/07, Pan Troglodytes <[EMAIL PROTECTED]<chimpathetic%40gmail.com>>
wrote:

> This time, I have the progress bar working in event mode, cranking
through sending off progress events. It works fine, except when it gets to
one section of the code. I want to send back the progress while this one
very long and time consuming function is happening. So I have several points
where I dispatch a progress event to the progress bar. I have added a
"progress" event to the bar to write a line to the trace log. It gets these
progress events. However, it doesn't update the bar. It seems that the bar
redraw is holding off until the other function finishes. This is defeating
the whole purpose of having the progress bar.
>
> Is there some way I can force a bar redraw? I've tried some of the
invalidate/validate methods with no luck.

Try calling validateNow() on the progress bar on the "progress" event.

This obviously means you're doing the whole measurement/layout every
time a progress event fires, so you probably want to do it on every
Nth iteration.

progress="counter++;if(counter%10==0)progressBar.validateNow()"



--
Jason

Reply via email to