File: firebutton

package info (click to toggle)
libtk-gbarr-perl 2.08-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 284 kB
  • sloc: perl: 1,875; makefile: 19
file content (17 lines) | stat: -rwxr-xr-x 309 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Button with "repeat" effect.
#!/usr/local/bin/perl -w
use strict;
use Tk;
use Tk::FireButton;

my $i = 0;

my $mw = Tk::MainWindow->new();
my $fb = $mw->FireButton(
		-text=>'Fire',
		-command=>sub{$i++;}
		)->pack;
my $l = $mw->Label(-textvariable=>\$i)->pack(qw/-padx 10 -pady 6/);

Tk::MainLoop;
__END__