1label(n)                     Tk Built-In Commands                     label(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       label - Create and manipulate label widgets
9

SYNOPSIS

11       label pathName ?options?
12

STANDARD OPTIONS

14       -activebackground     -disabledforeground  -padx
15       -activeforeground     -font                -pady
16       -anchor               -foreground          -relief
17       -background           -highlightbackground -takefocus
18       -bitmap               -highlightcolor      -text
19       -borderwidth          -highlightthickness  -textvariable
20       -compound             -image               -underline
21       -cursor               -justify             -wraplength
22
23       See the options manual entry for details on the standard options.
24

WIDGET-SPECIFIC OPTIONS

26       [-height height] Specifies a desired height for the label.  If an image
27       or bitmap is being displayed in the label then the value is  in  screen
28       units  (i.e.  any of the forms acceptable to Tk_GetPixels); for text it
29       is in lines of text.  If  this  option  isn't  specified,  the  label's
30       desired height is computed from the size of the image or bitmap or text
31       being displayed in it.  [-state state] Specifies one  of  three  states
32       for  the label:  normal, active, or disabled.  In normal state the but‐
33       ton is displayed using  the  foreground  and  background  options.   In
34       active  state  the  label  is  displayed using the activeForeground and
35       activeBackground options.  In the disabled state the disabledForeground
36       and   background   options  determine  how  the  button  is  displayed.
37       [-width width] Specifies a desired width for the label.  If an image or
38       bitmap  is  being  displayed  in  the label then the value is in screen
39       units (i.e. any of the forms acceptable to Tk_GetPixels); for  text  it
40       is  in characters.  If this option isn't specified, the label's desired
41       width is computed from the size of the image or bitmap  or  text  being
42       displayed in it.
43_________________________________________________________________
44
45

DESCRIPTION

47       The label command creates a new window (given by the pathName argument)
48       and makes it into a label widget.  Additional options, described above,
49       may  be specified on the command line or in the option database to con‐
50       figure aspects of the label such as its colors, font, text, and initial
51       relief.   The label command returns its pathName argument.  At the time
52       this command is invoked, there must not exist a window named  pathName,
53       but pathName's parent must exist.
54
55       A  label  is  a widget that displays a textual string, bitmap or image.
56       If text is displayed, it must all be in  a  single  font,  but  it  can
57       occupy  multiple  lines  on  the  screen (if it contains newlines or if
58       wrapping occurs because of the wrapLength option) and one of the  char‐
59       acters  may  optionally  be underlined using the underline option.  The
60       label can be manipulated in a few simple ways,  such  as  changing  its
61       relief or text, using the commands described below.
62
63

WIDGET COMMAND

65       The  label  command  creates  a new Tcl command whose name is pathName.
66       This command may be used to invoke various operations  on  the  widget.
67       It has the following general form:
68              pathName option ?arg arg ...?
69       Option  and  the args determine the exact behavior of the command.  The
70       following commands are possible for label widgets:
71
72       pathName cget option
73              Returns the current value of the configuration option  given  by
74              option.  Option may have any of the values accepted by the label
75              command.
76
77       pathName configure ?option? ?value option value ...?
78              Query or modify the configuration options of the widget.  If  no
79              option is specified, returns a list describing all of the avail‐
80              able options for pathName (see Tk_ConfigureInfo for  information
81              on  the  format  of  this list).  If option is specified with no
82              value, then the command returns a list describing the one  named
83              option (this list will be identical to the corresponding sublist
84              of the value returned if no option is  specified).   If  one  or
85              more option-value pairs are specified, then the command modifies
86              the given widget option(s) to have the given value(s);  in  this
87              case  the  command returns an empty string.  Option may have any
88              of the values accepted by the label command.
89
90

BINDINGS

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

KEYWORDS

97       label, widget
98
99
100
101Tk                                    4.0                             label(n)
Impressum