summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl')
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl28
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl
new file mode 100644
index 00000000000..61e6ec61b77
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl
@@ -0,0 +1,28 @@
+# image1.pl
+
+use vars qw/$TOP/;
+
+sub image1 {
+
+ # This demonstration script displays two image widgets.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This demonstration displays two images, each in a separate label widget.',
+ -title => 'Image Demonstration #1',
+ -iconname => 'image1',
+ );
+
+ my(@pl) = qw/-side top -padx .5m -pady .5m/;
+ $TOP->Photo('image1a', -file => Tk->findINC('demos/images/earth.gif'));
+ $TOP->Label(-image => 'image1a')->pack(@pl);
+
+ $TOP->Photo('image1b', -file => Tk->findINC('demos/images/earthris.gif'));
+ $TOP->Label(-image => 'image1b')->pack(@pl);
+
+} # end image1
+
+1;
+
+