Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

Tk::Label (3)

Name

Tk::Label - Create and manipulate Label widgets

Synopsis

$label = $parent->Label(?options?);

Description

User Contributed Perl Documentation                                   Label(3)



NAME
       Tk::Label - Create and manipulate Label widgets

SYNOPSIS
       $label = $parent->Label(?options?);

STANDARD OPTIONS
       -activebackground -activeforeground -anchor -background -bitmap
       -borderwidth -compound -cursor -disabledforeground -font -foreground
       -highlightbackground -highlightcolor -highlightthickness -image
       -justify -padx -pady -relief -takefocus -text -textvariable -underline
       -wraplength

       See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS
       Name:     height
       Class:    Height
       Switch:   -height
           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 Tk_GetPixels); 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.

       Name:     state
       Class:    State
       Switch:   -state
           Specifies one of three states for the label: normal, active, or
           disabled. In normal state the label is displayed using the
           foreground and background options. In active state the label is
           displayed using the activeForeground and activeBackground options.
           In the disabled state the disabledForeground and background options
           determine how the button is displayed.

       Name:     width
       Class:    Width
       Switch:   -width
           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 Tk_GetPixels); 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.

DESCRIPTION
       The Label method creates a new window (given by the $widget 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 label command returns its $widget argument.  At
       the time this command is invoked, there must not exist a window named
       $widget, but $widget's parent must exist.

       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 wrapLength option) and one of the
       characters may optionally be underlined using the underline option.
       The label can be manipulated in a few simple ways, such as changing its
       relief or text, using the commands described below.

WIDGET METHODS
       The Label method creates a widget object.  This object supports the
       configure and cget 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.

BINDINGS
       When a new label is created, it has no default event bindings: labels
       are not intended to be interactive.

KEYWORDS
       label, widget



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+----------------------------+
       |ATTRIBUTE TYPE |      ATTRIBUTE VALUE       |
       +---------------+----------------------------+
       |Availability   | library/perl-5/perl-tk-532 |
       +---------------+----------------------------+
       |Stability      | Volatile                   |
       +---------------+----------------------------+

NOTES
       Source code for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       http://search.cpan.org/CPAN/authors/id/S/SR/SREZIC/Tk-804.036.tar.gz.

       Further information about this software can be found on the open source
       community website at http://search.cpan.org/~srezic/Tk.



perl v5.32.0                      2013-11-15                          Label(3)