in reply to Re: Re: Best Way to Implement a Progress Bar (Tk?)
in thread Best Way to Implement a Progress Bar (Tk?)
widget is a program which is included in every Tk install. As cited above, if you are running Activestate Perl, you will find it as widget.bat in your perl\bin directory. *NIX users will find it in /usr/bin or suchlike -- wherever perl is to be found.
FYI, however, here is a working ProgressBar example:
#!/usr/bin/perl -w use strict; use Tk; use Tk::ProgressBar; use vars qw($status_var); my $main = Tk::MainWindow->new; $main->title('Foo'); $main->Label(-text=>'Loading, please wait...')->pack; $status_var = 0; $main->ProgressBar( -variable => \$status_var, -from => 0, -to => 100 )->pack; $main->after(500,\&do_stuff); Tk::MainLoop; sub do_stuff { for (1..10) { $status_var+= 10; $main->update; sleep 1; } Tk::exit; }
perl -e 'print "I love $^X$\"$]!$/"#$&V"+@( NO CARRIER'
|
|---|