Home Contact

TkDocs

Information you need to build high-quality Tk user interfaces.

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

Frame

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.
Tcl usage: ttk::frame .f
Ruby usage: Tk::Tile::Frame.new(parent)
Reference: (at www.tcl.tk)

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.
width,
height
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.