1
by Stephen Zander
Import upstream version 800.024 |
1 |
#!/usr/local/bin/perl -w
|
2 |
use strict; |
|
3 |
use Tk; |
|
4 |
require Tk::Pixmap; |
|
5 |
||
6 |
my $mw = MainWindow->new; |
|
7 |
||
8 |
my $file = Tk->findINC("demos/images/QuitPB.xpm"); |
|
9 |
||
10 |
die "No file" unless defined($file); |
|
11 |
||
12 |
print "Loading $file\n"; |
|
13 |
||
14 |
my $QuitPB = $mw->Pixmap('-file' => $file); |
|
15 |
||
16 |
print "Pixmap is $QuitPB\n"; |
|
17 |
||
18 |
my $QuitPBa = $mw->Pixmap('-file' => Tk->findINC("demos/images/QuitPBa.xpm")); |
|
19 |
||
20 |
$mw->Label(-background => 'yellow', -image => $QuitPB)->pack; |
|
21 |
||
22 |
||
23 |
$mw->Button(-image => $QuitPB, -activeimage => $QuitPBa, |
|
24 |
-background => 'green', |
|
25 |
-activebackground => 'green', |
|
26 |
-command => [destroy => $mw])->pack; |
|
27 |
MainLoop; |
|
28 |