summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-05 22:27:26 +0000
committerKarl Berry <karl@freefriends.org>2016-04-05 22:27:26 +0000
commitb56b320b5e2515160073fa1b469514002688fe11 (patch)
tree965a7100c5e45fca8ec803d22b8b6ce14fca4633 /Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl
parentd26c206452d2e285c3bbf949f34011e4a55fd8f9 (diff)
tlperl 5.22.1 from siep
git-svn-id: svn://tug.org/texlive/trunk@40252 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl')
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl74
1 files changed, 0 insertions, 74 deletions
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl
deleted file mode 100644
index 17d191a7c9b..00000000000
--- a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl
+++ /dev/null
@@ -1,74 +0,0 @@
-# labelframe.pl
-
-use vars qw/$TOP/;
-
-sub labelframe {
-
- # Create a top-level window that displays several Labelframe widgets.
-
- my($demo) = @_;
- $TOP = $MW->WidgetDemo(
- -geometry_manager => 'grid',
- -name => $demo,
- -text => 'Labelframes are used to group related widgets together. The label maybe either plain text or another widget.',
- -title => 'Labelframe Demonstration',
- -iconname => 'labelframe',
- );
-
- # A group of radiobuttons in a labelframe
-
- my $lf1 = $TOP->Labelframe(qw/-text Value -padx 2 -pady 2/);
- $lf1->grid(qw/-row 0 -column 0 -pady 2m -padx 2m/);
-
- my $lfdummy;
- foreach my $value (1 .. 4) {
- $lf1->Radiobutton(
- -text => "This is value $value" ,
- -variable => \$lfdummy,
- -value => $value,
- )->pack(qw/-side top -fill x -pady 2/);
- }
-
- # A label window controlling a group of options.
-
- my $lf2 = $TOP->Labelframe(qw/-pady 2 -padx 2/);
- $lf2->grid(qw/-row 0 -column 1 -pady 2m -padx 2m/);
- my $lfdummy2;
- my $cb;
- $cb = $lf2->Checkbutton(
- -text => 'Use this option',
- -variable => \$lfdummy2,
- -command => sub {&labelframe_buttons($lf2, $cb, \$lfdummy2)},
- -padx => 0,
- );
- $lf2->configure(-labelwidget => $cb);
-
- foreach my $str (qw/Option1 Option2 Option3/) {
- $lf2->Checkbutton(-text => $str)->pack(qw/-side top -fill x -pady 2/);
- }
-
- &labelframe_buttons($lf2, $cb, \$lfdummy2);
-
- $TOP->gridColumnconfigure([0, 1], -weight => 1);
-
-} # end labelframe
-
-sub labelframe_buttons {
-
- # The state of the sub-Checkbuttons is dependent upon the state of
- # the master -labelwidget Checkbutton.
-
- my ($lf, $cb, $var_ref) = @_;
-
- foreach my $child ($lf->children) {
- next if $child == $cb;
- if ($$var_ref) {
- $child->configure(qw/-state normal/);
- } else {
- $child->configure(qw/-state disabled/);
- }
- }
-
-} # end labelframe_buttons
-
-1;