.\" -*- 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 "Label 3pm" .TH Label 3pm 2024-03-07 "perl v5.38.2" "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::Label \- Create and manipulate Label widgets .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fR\f(CI$label\fR\fI\fR = \fI\fR\f(CI$parent\fR\fI\fR\->\fBLabel\fR(?\fIoptions\fR?); .SH "STANDARD OPTIONS" .IX Header "STANDARD OPTIONS" \&\fB\-activebackground\fR \&\fB\-activeforeground\fR \&\fB\-anchor\fR \&\fB\-background\fR \&\fB\-bitmap\fR \&\fB\-borderwidth\fR \&\fB\-compound\fR \&\fB\-cursor\fR \&\fB\-disabledforeground\fR \&\fB\-font\fR \&\fB\-foreground\fR \&\fB\-highlightbackground\fR \&\fB\-highlightcolor\fR \&\fB\-highlightthickness\fR \&\fB\-image\fR \&\fB\-justify\fR \&\fB\-padx\fR \&\fB\-pady\fR \&\fB\-relief\fR \&\fB\-takefocus\fR \&\fB\-text\fR \&\fB\-textvariable\fR \&\fB\-underline\fR \&\fB\-wraplength\fR .PP See Tk::options for details of the standard options. .SH "WIDGET-SPECIFIC OPTIONS" .IX Header "WIDGET-SPECIFIC OPTIONS" .IP "Name: \fBheight\fR" 4 .IX Item "Name: height" .PD 0 .IP "Class: \fBHeight\fR" 4 .IX Item "Class: Height" .IP "Switch: \fB\-height\fR" 4 .IX Item "Switch: -height" .PD Specifies a desired height for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. If this option isn't specified, the label's desired height is computed from the size of the image or bitmap or text being displayed in it. .IP "Name: \fBstate\fR" 4 .IX Item "Name: state" .PD 0 .IP "Class: \fBState\fR" 4 .IX Item "Class: State" .IP "Switch: \fB\-state\fR" 4 .IX Item "Switch: -state" .PD Specifies one of three states for the label: \fBnormal\fR, \fBactive\fR, or \&\fBdisabled\fR. In normal state the label is displayed using the \&\fBforeground\fR and \fBbackground\fR options. In active state the label is displayed using the \fBactiveForeground\fR and \fBactiveBackground\fR options. In the disabled state the \fBdisabledForeground\fR and \&\fBbackground\fR options determine how the button is displayed. .IP "Name: \fBwidth\fR" 4 .IX Item "Name: width" .PD 0 .IP "Class: \fBWidth\fR" 4 .IX Item "Class: Width" .IP "Switch: \fB\-width\fR" 4 .IX Item "Switch: -width" .PD Specifies a desired width for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in characters. If this option isn't specified, the label's desired width is computed from the size of the image or bitmap or text being displayed in it. .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBLabel\fR method creates a new window (given by the \&\f(CW$widget\fR argument) and makes it into a label widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the label such as its colors, font, text, and initial relief. The \fBlabel\fR command returns its \&\f(CW$widget\fR argument. At the time this command is invoked, there must not exist a window named \f(CW$widget\fR, but \&\f(CW$widget\fR's parent must exist. .PP A label is a widget that displays a textual string, bitmap or image. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the \fBwrapLength\fR option) and one of the characters may optionally be underlined using the \&\fBunderline\fR option. The label can be manipulated in a few simple ways, such as changing its relief or text, using the commands described below. .SH "WIDGET METHODS" .IX Header "WIDGET METHODS" The \fBLabel\fR method creates a widget object. This object supports the \fBconfigure\fR and \fBcget\fR methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class. .SH BINDINGS .IX Header "BINDINGS" When a new label is created, it has no default event bindings: labels are not intended to be interactive. .SH KEYWORDS .IX Header "KEYWORDS" label, widget