home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _38767768bfeb95ac5c0cb78f5b5f5e27 < prev    next >
Text File  |  2004-06-01  |  720b  |  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.