.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "LabFrame 3" .TH LabFrame 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Tk::LabFrame \- labeled frame. .SH SYNOPSIS .IX Header "SYNOPSIS" \ \ \ \ \fBuse Tk::LabFrame;\fR .PP \ \ \ \ \fR\f(CI$f\fR\fI\fR = \fI\fR\f(CI$parent\fR\fI\fR\->\fBLabFrame\fR(?\fB\-label\fR=>\fItext\fR, \&\fB\-labelside\fR=>\fIwhere\fR, ...?); .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBLabFrame\fR is exactly like \fBFrame\fR and additionaly allows to add a label to the frame. .SH WIDGET-OPTIONS .IX Header "WIDGET-OPTIONS" \&\fBLabFrame\fR supports the same options as the Frame widget. .PP Additional options of \fBLabFrame\fR are: .IP "\fB\-font\fR => \fIfont\fR" 4 .IX Item "-font => font" Specifies the label's font .IP "\fB\-foreground\fR => \fIcolor\fR" 4 .IX Item "-foreground => color" Specifies the label's foreground color .IP "\fB\-label\fR => \fItext\fR" 4 .IX Item "-label => text" The text of the label to be placed with the Frame. .IP "\fB\-labelside\fR => \fIwhere\fR" 4 .IX Item "-labelside => where" \&\fIWhere\fR can be one of \fBleft\fR, \fBright\fR, \fBtop\fR, \fBbottom\fR or \fBacrosstop\fR. The first four work as might be expected and place the label to the left, right, above or below the frame respectively. The \fBacrosstop\fR creates a grooved frame around the central frame and puts the label near the northwest corner such that it appears to "overwrite" the groove. .IP "\fB\-labelvariable\fR => \fIscalar_ref\fR" 4 .IX Item "-labelvariable => scalar_ref" Specifies a reference to a variable and used as an alternative to \-label. If the value of the variable changes, then the widget will be updated automatically to reflect the change. Used like \-textvariable. .SH "ADVERTISED SUBWIDGETS" .IX Header "ADVERTISED SUBWIDGETS" See "Subwidget" in Tk::mega how to use advertised widgets. .IP \fIborder\fR 4 .IX Item "border" .Vb 1 \& Frame used to display the border .Ve .IP \fIframe\fR 4 .IX Item "frame" .Vb 1 \& Frame used to create new LabFrame children. .Ve .IP \fIlabel\fR 4 .IX Item "label" .Vb 1 \& Label used for displaying text .Ve .SH EXAMPLE .IX Header "EXAMPLE" Run the following test program to see this in action: .PP .Vb 4 \& use strict; \& use Tk; \& require Tk::LabFrame; \& require Tk::LabEntry; \& \& my $test = \*(AqTest this\*(Aq; \& my $mw = Tk::MainWindow\->new; \& my $f = $mw\->LabFrame(\-label => "This is a label", \& \-labelside => "acrosstop"); \& $f\->LabEntry(\-label => "Testing", \-textvariable => \e$test)\->pack; \& $f\->pack; \& Tk::MainLoop; .Ve .SH BUGS .IX Header "BUGS" Perhaps \fBLabFrame\fR should be subsumed within the generic pTk labeled widget mechanism. .SH AUTHOR .IX Header "AUTHOR" \&\fBRajappa Iyer\fR rsi@earthling.net .PP This code is derived from LabFrame.tcl and LabWidg.tcl in the Tix4.0 distribution by Ioi Lam. The code may be redistributed under the same terms as Perl.