jack123 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Tk::Animation; my $gif = 'C:/wamp/bin/Perl/bin/ajax_loader.gif'; my $mw = MainWindow->new; my $img = $mw->Animation( '-format' => 'gif', '-file' => $gif, ); $mw->Label('-image' => $img)->pack; my $lab = $mw->Label('-text' => "Please wait a moment while we fetch y +our setting information.......")->pack; $img->start_animation(100); my $start = $mw->Button(-text => 'Restart', -command => ['start_animat +ion' => $img, 50])->pack; my $stop = $mw->Button(-text => 'Stop', -command => ['stop_animation' + => $img, $lab='', $img->set_disposal_method(0)])->pack; my $pause = $mw->Button(-text => 'Pause', -command => ['pause_animatio +n' => $img])->pack; my $resume = $mw->Button(-text => 'Resume', -command => ['resume_anima +tion' => $img, 50])->pack; my $ff = $mw->Button(-text => '>>', -command => ['fast_forward' => $im +g,2])->pack; my $fr = $mw->Button(-text => '<<', -command => ['fast_reverse' => $im +g,-2])->pack; my $quit = $mw->Button(-text => 'Quit', -command => [destroy => $mw]) +->pack; $img->set_disposal_method(1); $mw->MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to hide/show gif on click
by kcott (Archbishop) on May 11, 2012 at 08:59 UTC | |
|
Re: How to hide/show gif on click
by zentara (Cardinal) on May 11, 2012 at 09:47 UTC |