Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tk help

Status
Not open for further replies.

moof15

Programmer
Aug 22, 2002
23
0
0
US
Hi all:
I just need to know how to you reset a progress bar back to the beginning of the progress bar after it completes the first script.
This is what I have now and it only does one script:
$ProgressBar2->configure(-value => $loop_index2);
$ProgressBar2->update;

Thanks,
moof15
 
You need to set the variable that controls the progress bar to 0. Here's an example:
Code:
use Tk;
use Tk::ProgressBar;
$Main = MainWindow->new(); 
$ResetButton = $Main->Button(-text=>'Reset', -command=>sub {$PctDone=0})->pack();
$PctDone = 35;
$ProgressBar = $Main->ProgressBar(-variable => \$PctDone)->pack();
MainLoop();
exit;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top