1frame(n) Tk Built-In Commands frame(n)
2
3
4
5______________________________________________________________________________
6
8 frame - Create and manipulate frame widgets
9
11 frame pathName ?options?
12
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
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. [-height height] Specifies the desired
44 height for the window in any of the forms acceptable to Tk_GetPixels.
45 If this option is less than or equal to zero then the window will not
46 request any size at all. Note that this sets the total height of the
47 frame, any -borderwidth or similar is not added. Normally -height
48 should not be used if a propagating geometry manager, such as grid or
49 pack, is used within the frame since the geometry manager will override
50 the height of the frame. [-visual visual] Specifies visual information
51 for the new window in any of the forms accepted by Tk_GetVisual. If
52 this option is not specified, the new window will use the same visual
53 as its parent. The visual option may not be modified with the config‐
54 ure widget command. [-width width] Specifies the desired width for the
55 window in any of the forms acceptable to Tk_GetPixels. If this option
56 is less than or equal to zero then the window will not request any size
57 at all. Note that this sets the total width of the frame, any -border‐
58 width or similar is not added. Normally -width should not be used if a
59 propagating geometry manager, such as grid or pack, is used within the
60 frame since the geometry manager will override the width of the frame.
61_________________________________________________________________
62
64 The frame command creates a new window (given by the pathName argument)
65 and makes it into a frame widget. Additional options, described above,
66 may be specified on the command line or in the option database to con‐
67 figure aspects of the frame such as its background color and relief.
68 The frame command returns the path name of the new window.
69
70 A frame is a simple widget. Its primary purpose is to act as a spacer
71 or container for complex window layouts. The only features of a frame
72 are its background color and an optional 3-D border to make the frame
73 appear raised or sunken.
74
76 The frame command creates a new Tcl command whose name is the same as
77 the path name of the frame's window. This command may be used to
78 invoke various operations on the widget. It has the following general
79 form:
80 pathName option ?arg arg ...?
81 PathName is the name of the command, which is the same as the frame
82 widget's path name. Option and the args determine the exact behavior
83 of the command. The following commands are possible for frame widgets:
84
85 pathName cget option
86 Returns the current value of the configuration option given by
87 option. Option may have any of the values accepted by the frame
88 command.
89
90 pathName configure ?option? ?value option value ...?
91 Query or modify the configuration options of the widget. If no
92 option is specified, returns a list describing all of the avail‐
93 able options for pathName (see Tk_ConfigureInfo for information
94 on the format of this list). If option is specified with no
95 value, then the command returns a list describing the one named
96 option (this list will be identical to the corresponding sublist
97 of the value returned if no option is specified). If one or
98 more option-value pairs are specified, then the command modifies
99 the given widget option(s) to have the given value(s); in this
100 case the command returns an empty string. Option may have any
101 of the values accepted by the frame command.
102
104 When a new frame is created, it has no default event bindings: frames
105 are not intended to be interactive.
106
108 labelframe(n), toplevel(n), ttk::frame(n)
109
111 frame, widget
112
113
114
115Tk 8.4 frame(n)