Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | # image1.pl |
2 | ||
3 | use vars qw/$TOP/; | |
4 | ||
5 | sub image1 { | |
6 | ||
7 | # This demonstration script displays two image widgets. | |
8 | ||
9 | my($demo) = @_; | |
10 | $TOP = $MW->WidgetDemo( | |
11 | -name => $demo, | |
12 | -text => 'This demonstration displays two images, each in a separate label widget.', | |
13 | -title => 'Image Demonstration #1', | |
14 | -iconname => 'image1', | |
15 | ); | |
16 | ||
17 | my(@pl) = qw/-side top -padx .5m -pady .5m/; | |
18 | $TOP->Photo('image1a', -file => Tk->findINC('demos/images/earth.gif')); | |
19 | $TOP->Label(-image => 'image1a')->pack(@pl); | |
20 | ||
21 | $TOP->Photo('image1b', -file => Tk->findINC('demos/images/earthris.gif')); | |
22 | $TOP->Label(-image => 'image1b')->pack(@pl); | |
23 | ||
24 | } # end image1 | |
25 | ||
26 | 1; | |
27 | ||
28 |