No such thing as a small change | |
PerlMonks |
Re: Best Way to Implement a Progress Bar (Tk?)by tinman (Curate) |
on Apr 12, 2001 at 02:23 UTC ( [id://71879]=note: print w/replies, xml ) | Need Help?? |
If you want a way to update the status bar, Tk::after might be what you need. It allows time delayed callbacks to be made to a particular subroutine. So, you could have a subroutine that checks progress, and updates the status bar variable. This would be called by the $w->after command. (you can set a reference to the callback and the delay in milliseconds between calls. The widget example that I referred to is found in the standard distribution. Just in case you can't get your hands on a copy, I'm pasting it in here. Unfortunately, all my scripts that use Tk::ProgressBar are back at home :o) several thousand miles away...
What I'd suggest is that you have a method that updates the variable $status_var in a callback.
HTH
In Section
Seekers of Perl Wisdom
|
|