JojoLinkyBob has asked for the wisdom of the Perl Monks concerning the following question:
The stumbling block I have is that the MainLoop locks me from continuously updating the progress bar, and every example of timer function I've found seems to be Tk-centric, not workable with Perl. So my question is: Is there a better graphical toolkit for this job? OR If Tk is the answer, how does one implement a timer function in the creation of a Tk widget? The examples I have followed don't work well. Thanks in advance, Desert coderuse Tk; $total_objects = 303; $progressbar_width = 2*$total_objects; $progressbar_height = 50; my $main = MainWindow->new; $canvas1 = $main->Canvas( '-width' => $progressbar_width, -height => $progressbar_height, -background => 'black', -command => sub {print "oh shit"} ) -> pack; $canvas1->create ('rectangle','0','0',10,$progressbar_height,-fill=>'red'); MainLoop; sub myupdatefunk { }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best Way to Implement a Progress Bar (Tk?)
by tinman (Curate) on Apr 11, 2001 at 03:33 UTC | |
by JojoLinkyBob (Scribe) on Apr 11, 2001 at 19:57 UTC | |
by JojoLinkyBob (Scribe) on Apr 11, 2001 at 20:00 UTC | |
by tinman (Curate) on Apr 12, 2001 at 02:23 UTC | |
by Chmrr (Vicar) on Apr 12, 2001 at 02:28 UTC |