in reply to TK Progress Bar
#!/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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: TK Progress Bar
by Anonymous Monk on Aug 11, 2003 at 08:42 UTC |