Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi All.......... My perl application is currently using Tk module to display a window on UNIX terminal. I am displaying that window after performing some operation which takes around 1 minute. I need to fill this time gap with some sort of GUI indicator. Suggest me some simple/common perl module which is available in INC array by default that can create some indicator and I should be able to destroy before displaying the result window. Thanks.. waiting for quick replies. Thnx .:-).

Replies are listed 'Best First'.
Re: GUI indicator in Perl
by planetscape (Chancellor) on Oct 28, 2005 at 15:05 UTC
Re: GUI indicator in Perl
by zentara (Cardinal) on Oct 28, 2005 at 17:35 UTC
    This is about as simple an indicator as you can get.
    #!/usr/bin/perl use Tk; my $mw = MainWindow->new; $mw->geometry('-5-0'); $mw->overrideredirect(1); my @color = qw/red green/; my $bits = pack("b8"x8, "...11...", "..1111..", ".111111.", "11111111", "11111111", ".111111.", "..1111..", "...11...",); $mw->DefineBitmap('indicator' => 8,8, $bits); my $label = $mw->Label( -bitmap=>'indicator', -bg=>'black', -fg=>'red', )->pack; $mw->repeat(500,sub{$label->configure( -fg=>$color[0]); @color=reverse(@color); }); MainLoop;

    I'm not really a human, but I play one on earth. flash japh