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