diff options
Diffstat (limited to 'Master/tlpkg/tlperl0/lib/Tk/demos/widget_lib/paned1.pl')
-rwxr-xr-x | Master/tlpkg/tlperl0/lib/Tk/demos/widget_lib/paned1.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl0/lib/Tk/demos/widget_lib/paned1.pl b/Master/tlpkg/tlperl0/lib/Tk/demos/widget_lib/paned1.pl new file mode 100755 index 00000000000..4a988ddd6da --- /dev/null +++ b/Master/tlpkg/tlperl0/lib/Tk/demos/widget_lib/paned1.pl @@ -0,0 +1,26 @@ +# paned1.pl + +use vars qw/$TOP/; + +sub paned1 { + + # This demonstration script creates a toplevel window containing + # a paned window that separates two windows horizontally. + + my($demo) = @_; + $TOP = $MW->WidgetDemo( + -name => $demo, + -text => 'The sash between the two coloured windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.)', + -title => 'Horizontal Paned Window Demonstration', + -iconname => 'paned1', + ); + + my $pw = $TOP->Panedwindow; + $pw->pack(qw/-side top -expand yes -fill both -pady 2 -padx 2m/); + + my $l1 = $pw->Label(-text => "This is the\nleft side", -background => 'yellow'); + my $l2 = $pw->Label(-text => "This is the\nright side", -background =>'cyan'); + + $pw->add($l1, $l2); + +} # end paned1 |