Modern Tkinter
Widget Pictures

Frame Widgets

The widget roundup provides you with a quick and easy reference to the most important features and options for each Tk widget.


Widget Essentials

When to use: As a container for other widgets, either to simplify layout, to help with spacing around the border of a user interface, or to visually distinguish an area as e.g. sunken.
Python:frame = ttk.Frame(parent)
Tcl:ttk::frame .frame
Ruby:frame =
Perl:my $frame = $parent->new_ttk__frame;

Common Options

padding Extra padding to be left on the inside of the frame; single argument is same padding all around, two arguments is different horizontal and vertical, and four is different for left, top, right and bottom.
borderwidth Width of a border around the widget, used in conjunction with relief.
relief How to display the frame's border: flat, raised, sunken, solid, ridge, groove.
Specify an explicit size for the frame to request; if the frame contains other widgets, normally this is omitted, and the frame requests the size needed to accommodate the other widgets.