The Tkinter Frame Class
- Frame(master=None, **options) (class) [#]
A widget container.
- Parent widget.
- Widget options. See the description of the config method for a list of available options.
- config(**options) [#]
Modifies one or more widget options. If no options are given, the method returns a dictionary containing all current option values.
- Widget options.
- The background color to use in this frame. This defaults to the application background color. To prevent updates, set the color to an empty string. (the option database name is background, the class is Background)
- Same as background.
- Border width. Defaults to 0 (no border). (borderWidth/BorderWidth)
- Same as borderwidth.
- Default is Frame. (class/Class)
Some displays support only 256 colors
(some use even less). Such displays usually provide a
color map to specify which 256 colors to use. This
option allows you to specify which color map to use
for this frame, and its child widgets.
By default, a new frame uses the same color map as its parent. Using this option, you can reuse the color map of another window instead (this window must be on the same screen and have the same visual characteristics). You can also use the value “new” to allocate a new color map for this frame.
You cannot change this option once you’ve created the frame. (colormap/Colormap)
- Default is 0. (container/Container)
- The cursor to show when the mouse pointer is placed over this widget. Default is a system specific arrow cursor. (cursor/Cursor)
- Default is 0. (height/Height)
- Default is system specific. (highlightBackground/HighlightBackground)
- Default value is system specific. (highlightColor/HighlightColor)
- Default is 0. (highlightThickness/HighlightThickness)
- Horizontal padding. Default is 0. (padX/Pad)
- Vertical padding. Default is 0. (padY/Pad)
Border decoration. The default is FLAT.
Other possible values are SUNKEN, RAISED,
GROOVE, and RIDGE.
Note that to show the border, you need to change the borderwidth from its default value of 0. (relief/Relief)
- If true, the user can use the Tab key to move to this widget. The default value is 0. (takeFocus/TakeFocus)
- No default value. (visual/Visual)
- Default value is 0. (width/Width)