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

NAME

8       labelframe - Create and manipulate labelframe widgets
9

SYNOPSIS

11       labelframe pathName ?options?
12

STANDARD OPTIONS

14       -borderwidth          -highlightbackground -pady
15       -cursor               -highlightcolor      -relief
16       -font                 -highlightthickness  -takefocus
17       -foreground           -padx                -text
18
19       See the options manual entry for details on the standard options.
20

WIDGET-SPECIFIC OPTIONS

22       [-background background]  This option is the same as the standard back‐
23       ground option except that its value may also be specified as  an  empty
24       string.  In this case, the widget will display no background or border,
25       and no colors will be consumed from its colormap for its background and
26       border.   [-class class]  Specifies a class for the window.  This class
27       will be used when querying the option database for the  window's  other
28       options,  and  it  will  also  be used later for other purposes such as
29       bindings.  The class option may not be changed with the configure  wid‐
30       get  command.  [-colormap colormap] Specifies a colormap to use for the
31       window.  The value may be either new, in which case a new  colormap  is
32       created  for the window and its children, or the name of another window
33       (which must be on the same screen and have the  same  visual  as  path‐
34       Name),  in  which  case  the  new window will use the colormap from the
35       specified window.  If the colormap option is  not  specified,  the  new
36       window  uses  the  same colormap as its parent.  This option may not be
37       changed with the configure widget command.  [-container container]  The
38       value  must  be  a boolean.  If true, it means that this window will be
39       used as a container in which some other application  will  be  embedded
40       (for  example,  a  Tk  toplevel can be embedded using the -use option).
41       The window will support the appropriate window  manager  protocols  for
42       things like geometry requests.  The window should not have any children
43       of its own in this application.  This option may not  be  changed  with
44       the  configure  widget command.  [-height height] Specifies the desired
45       height for the window in any of the forms acceptable  to  Tk_GetPixels.
46       If  this  option is less than or equal to zero then the window will not
47       request any size at all.  [-labelanchor labelAnchor] Specifies where to
48       place  the  label. A label is only displayed if the -text option is not
49       the empty string.  Valid values  for  this  option  are  (listing  them
50       clockwise)  nw,  n, ne, en, e, es, se, s,sw, ws, w and wn.  The default
51       value is nw.  [-labelwidget labelWidget] Specifies a widget to  use  as
52       label.  This  overrides  any -text option. The widget must exist before
53       being used as -labelwidget and if it is not a descendant of  this  win‐
54       dow,  it  will be raised above it in the stacking order.  [-visual vis‐
55       ual] Specifies visual information for the new  window  in  any  of  the
56       forms  accepted  by Tk_GetVisual.  If this option is not specified, the
57       new window will use the same visual as its parent.  The  visual  option
58       may  not be modified with the configure widget command.  [-width width]
59       Specifies the desired width for the window in any of the forms  accept‐
60       able  to  Tk_GetPixels.   If  this option is less than or equal to zero
61       then the window will not request any size at all.
62_________________________________________________________________
63
64

DESCRIPTION

66       The labelframe command creates a new  window  (given  by  the  pathName
67       argument)  and  makes it into a labelframe widget.  Additional options,
68       described above, may be specified on the command line or in the  option
69       database  to configure aspects of the labelframe such as its background
70       color and relief.  The labelframe command returns the path name of  the
71       new window.
72
73       A  labelframe  is  a simple widget.  Its primary purpose is to act as a
74       spacer or container for complex window layouts.  It has the features of
75       a frame plus the ability to display a label.
76

WIDGET COMMAND

78       The labelframe command creates a new Tcl command whose name is the same
79       as the path name of the labelframe's window.  This command may be  used
80       to  invoke various operations on the widget.  It has the following gen‐
81       eral form:
82              pathName option ?arg arg ...?
83       PathName is the name of the command, which is the same  as  the  label‐
84       frame  widget's  path  name.   Option  and the args determine the exact
85       behavior of the command.  The following commands are possible for frame
86       widgets:
87
88       pathName cget option
89              Returns  the  current value of the configuration option given by
90              option.  Option may have any  of  the  values  accepted  by  the
91              labelframe command.
92
93       pathName configure ?option? ?value option value ...?
94              Query  or modify the configuration options of the widget.  If no
95              option is specified, returns a list describing all of the avail‐
96              able  options for pathName (see Tk_ConfigureInfo for information
97              on the format of this list).  If option  is  specified  with  no
98              value,  then the command returns a list describing the one named
99              option (this list will be identical to the corresponding sublist
100              of  the  value  returned  if no option is specified).  If one or
101              more option-value pairs are specified, then the command modifies
102              the  given widget option(s) to have the given value(s);  in this
103              case the command returns an empty string.  Option may  have  any
104              of the values accepted by the labelframe command.
105
106

BINDINGS

108       When  a  new  labelframe  is created, it has no default event bindings:
109       labelframes are not intended to be interactive.
110
111

SEE ALSO

113       frame(n), label(n)
114
115

KEYWORDS

117       labelframe, widget
118
119
120
121Tk                                    8.4                        labelframe(n)
Impressum