I have use this code to make the progress bar.its working terminal i cant get the out put in web browser.
I gonna use this code If you know the answer please hepl me:
I gonna use this code If you know the answer please hepl me:
Code:
use Tk; use Tk::WaitBox; use Tk::ProgressBar; # print "test1"; my $mw=""; $mw = MainWindow->new(-title => 'ProgressBar example'); # print "test2"; $progress = $mw->ProgressBar( -width => 30, height => 80, -from => 0, -to => 100, -blocks => 50, -colors => [0, 'red' , 30, 'red' , 50, 'green' , 80, 'green'], -variable => \$percent_done )->pack(-fill => 'x'); # $mw->Button(-text => 'Go!', -command=> sub { $arraycount=10000; $percentcalculation=$arraycount/100; for ($i = 0; $i < $arraycount; $i++) { $percent_done = $i/$percentcalculation; print "$i\n"; $mw->update; # otherwise we don't see how far we are. }