#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::ProgressIndicator; my $MainWindow = MainWindow->new(); my $total = 100; # this will vary my $ProgressIndicator = $MainWindow->ProgressIndicator ( '-current' => 0, '-limit' => 100, # this is fixed! '-increment' => 1, '-height' => 20, '-width' => 400 )->pack; foreach my $offset (0..$total) { $ProgressIndicator->configure ('-current' => $offset*100/$total,) +; $MainWindow->update; } MainLoop;
In reply to Re: TK Progress Bar
by zentara
in thread TK Progress Bar
by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |