Debian Codegraph @

pod/LabFrame.pod

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 =head1 NAME
2
3 Tk::LabFrame - labeled frame.
4
5 =for pm Tixish/LabFrame.pm
6
7 =for category Tix Extensions
8
9 =head1 SYNOPSIS
10
11 S< >B<use Tk::LabFrame;>
12
13 S< >I<$f> = I<$parent>-E<gt>B<LabFrame>(?B<-label>=E<gt>I<text>,
14 B<-labelside>=E<gt>I<where>, ...?);
15
16 =head1 DESCRIPTION
17
18 B<LabFrame> is exactly like B<Frame> and additionaly allows to
19 add a label to the frame.
20
21 =head1 WIDGET-OPTIONS
22
23 B<LabFrame> supports the same options as the
24 L<Frame|Tk::Frame/"STANDARD OPTIONS"> widget.
25
26 Additional options of B<LabFrame> are:
27
28 =over 4
29
30 =item B<-font> =E<gt> I<font>
31
32 Specifies the label's font
33
34 =item B<-foreground> =E<gt> I<color>
35
36 Specifies the label's foreground color
37
38 =item B<-label> =E<gt> I<text>
39
40 The text of the label to be placed with the Frame.
41
42 =item B<-labelside> =E<gt> I<where>
43
44 I<Where> can be one of B<left>, B<right>, B<top>, B<bottom> or B<acrosstop>.
45 The first four work as might be expected and place the label to the
46 left, right, above or below the frame respectively. The B<acrosstop>
47 creates a grooved frame around the central frame and puts the label
48 near the northwest corner such that it appears to "overwrite" the
49 groove.
50
51 =item B<-labelvariable> =E<gt> I<scalar_ref>
52
53 Specifies a reference to a variable and used as an
54 alternative to -label. If the value of the variable changes,
55 then the widget will be updated automatically to reflect the
56 change. Used like -textvariable.
57
58 =back
59
60 =head1 ADVERTISED SUBWIDGETS
61
62 See L<Tk::mega/"Subwidget"> how to use advertised widgets.
63
64 =over 4
65
66 =item I<border>
67
68 Frame used to display the border
69
70 =item I<frame>
71
72 Frame used to create new LabFrame children.
73
74 =item I<label>
75
76 Label used for displaying text
77
78 =back
79
80 =head1 EXAMPLE
81
82 Run the following test program to see this in action:
83
84 use strict;
85 use Tk;
86 require Tk::LabFrame;
87 require Tk::LabEntry;
88
89 my $test = 'Test this';
90 my $mw = Tk::MainWindow->new;
91 my $f = $mw->LabFrame(-label => "This is a label",
92 -labelside => "acrosstop");
93 $f->LabEntry(-label => "Testing", -textvariable => \$test)->pack;
94 $f->pack;
95 Tk::MainLoop;
96
97 =head1 BUGS
98
99 Perhaps B<LabFrame> should be subsumed within the generic pTk
100 labeled widget mechanism.
101
102 =head1 AUTHOR
103
104 B<Rajappa Iyer> [email protected]
105
106 This code is derived from LabFrame.tcl and LabWidg.tcl in the Tix4.0
107 distribution by Ioi Lam. The code may be redistributed under the same
108 terms as Perl.
109
110 =cut