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

NAME

8       frame - Create and manipulate frame widgets
9

SYNOPSIS

11       frame pathName ?options?
12

STANDARD OPTIONS

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

WIDGET-SPECIFIC OPTIONS

21       [-background background]  This option is the same as the standard back‐
22       ground option except that its value may also be specified as  an  empty
23       string.  In this case, the widget will display no background or border,
24       and no colors will be consumed from its colormap for its background and
25       border.   [-class class]  Specifies a class for the window.  This class
26       will be used when querying the option database for the  window's  other
27       options,  and  it  will  also  be used later for other purposes such as
28       bindings.  The class option may not be changed with the configure  wid‐
29       get  command.  [-colormap colormap] Specifies a colormap to use for the
30       window.  The value may be either new, in which case a new  colormap  is
31       created  for the window and its children, or the name of another window
32       (which must be on the same screen and have the  same  visual  as  path‐
33       Name),  in  which  case  the  new window will use the colormap from the
34       specified window.  If the colormap option is  not  specified,  the  new
35       window  uses  the  same colormap as its parent.  This option may not be
36       changed with the configure widget command.  [-container container]  The
37       value  must  be  a boolean.  If true, it means that this window will be
38       used as a container in which some other application  will  be  embedded
39       (for  example,  a  Tk  toplevel can be embedded using the -use option).
40       The window will support the appropriate window  manager  protocols  for
41       things like geometry requests.  The window should not have any children
42       of its own in this application.  This option may not  be  changed  with
43       the  configure widget command.  Note that -borderwidth, -padx and -pady
44       are ignored when configured as a container since  a  container  has  no
45       border.   [-height height]  Specifies the desired height for the window
46       in any of the forms acceptable to Tk_GetPixels.  If this option is less
47       than or equal to zero then the window will not request any size at all.
48       Note that this sets the total height of the frame, any -borderwidth  or
49       similar  is not added.  Normally -height should not be used if a propa‐
50       gating geometry manager, such as grid or pack, is used within the frame
51       since  the  geometry  manager  will  override  the height of the frame.
52       [-visual visual] Specifies visual information for the new window in any
53       of  the  forms  accepted by Tk_GetVisual.  If this option is not speci‐
54       fied, the new window will use the same visual as its parent.  The  vis‐
55       ual  option  may  not  be  modified  with the configure widget command.
56       [-width width] Specifies the desired width for the window in any of the
57       forms acceptable to Tk_GetPixels.  If this option is less than or equal
58       to zero then the window will not request any size at  all.   Note  that
59       this  sets the total width of the frame, any -borderwidth or similar is
60       not added.  Normally -width should not be used if a propagating  geome‐
61       try  manager,  such as grid or pack, is used within the frame since the
62       geometry manager will override the width of the frame.
63_________________________________________________________________
64

DESCRIPTION

66       The frame command creates a new window (given by the pathName argument)
67       and makes it into a frame widget.  Additional options, described above,
68       may be specified on the command line or in the option database to  con‐
69       figure  aspects  of  the frame such as its background color and relief.
70       The frame command returns the path name of the new window.
71
72       A frame is a simple widget.  Its primary purpose is to act as a  spacer
73       or  container for complex window layouts.  The only features of a frame
74       are its background color and an optional 3-D border to make  the  frame
75       appear raised or sunken.
76

WIDGET COMMAND

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

BINDINGS

106       When a new frame is created, it has no default event  bindings:  frames
107       are not intended to be interactive.
108

SEE ALSO

110       labelframe(n), toplevel(n), ttk::frame(n)
111

KEYWORDS

113       frame, widget
114
115
116
117Tk                                    8.4                             frame(n)
Impressum