1
#!/usr/local/bin/perl -w
6
$path = Tk->findINC("demos/images");
8
$top = MainWindow->new();
10
$bitmap = $top->Bitmap( '-file' => "$path/dir.icon",
11
'-maskfile' => "$path/dir.mask");
13
$photo = $top->Photo( 'photo');
15
$pixmap = $top->Pixmap( 'quit' , '-file' => "$path/QuitPB.xpm");
17
$top->Label('-image'=> $bitmap)->pack;
18
$top->Label('-image'=> $photo )->pack;
19
my $f = $top->Frame->pack;
20
$f->Button('-text' => 'PPM', '-command'
21
=> ['configure',$photo, -file => "$path/teapot.ppm" ] )->pack(-side => 'left');
22
$f->Button('-text' => 'GIF', '-command'
23
=> ['configure',$photo, -file => "$path/mickey.gif" ] )->pack(-side => 'left');
25
$f->Button('-text' => 'XBM', '-command'
26
=> ['configure',$photo, -file => "$path/face" ] )->pack(-side => 'left');
27
$f->Button('-text' => 'XPM', '-command'
28
=> ['configure',$photo, -file => "$path/QuitPBa.xpm" ] )->pack(-side => 'left');
29
$f->Button('-text' => 'Blank', '-command' => ['blank',$photo] )->pack;
30
$top->Button('-image'=> $pixmap, '-command'=>['destroy',$top] )->pack;