home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / firebutton.pl < prev    next >
Encoding:
Perl Script  |  2002-11-17  |  309 b   |  18 lines

  1. # Button with "repeat" effect.
  2. #!/usr/local/bin/perl -w
  3. use strict;
  4. use Tk;
  5. use Tk::FireButton;
  6.  
  7. my $i = 0;
  8.  
  9. my $mw = Tk::MainWindow->new();
  10. my $fb = $mw->FireButton(
  11.         -text=>'Fire',
  12.         -command=>sub{$i++;}
  13.         )->pack;
  14. my $l = $mw->Label(-textvariable=>\$i)->pack(qw/-padx 10 -pady 6/);
  15.  
  16. Tk::MainLoop;
  17. __END__
  18.