JSchmitz has asked for the wisdom of the Perl Monks concerning the following question:
I intially thought that maybe the mod was not installed correctly but I checked and it was fine. I am pretty sure it is in the Tk standard library. Anyways it shows as being up to date:#!/usr/bin/perl use Tk; use Tk::ProgressBar; my $mw = MainWindow->new(-title => 'Processing'); $Progress = $mw->ProgressBar( -width => 30, -from => 0, -to => 100, -blocks => 50, -colors => [0, 'green', 50, 'yellow' ,80, 'red'], -variable => \$percent_done )->pack(-fill => 'x'); $mw->Button(-text => 'Go!', -command=> sub { for ($i =0; $i < 1000; $i++) { $percent_done = $i/10; print "$i\n"; $mw->update; } })->pack(-side => 'bottom'); Mainloop;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Tk progress bar
by alien_life_form (Pilgrim) on May 12, 2002 at 18:11 UTC | |
Re: Tk progress bar
by hagus (Monk) on May 12, 2002 at 23:22 UTC | |
Warnings, strict
by The Alien (Sexton) on May 12, 2002 at 18:12 UTC |