home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / image1.pl < prev    next >
Encoding:
Text File  |  2004-06-01  |  720 b   |  29 lines

  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.  
  29.