close

Modern Tkinter ebook If you've found the material on this site useful, please consider purchasing this e-book (only $10), which is based on the Python material in the tutorial. Doing so helps me maintain and update this site. Thank you very much!


 
 
@markroseman
mark@markroseman.com

 

Kindle Buy now for your Kindle
Kindle apps are also available for most smartphones, tablets, and desktops. Payment and download handled by Amazon's Kindle Store.

 

PDF Buy the DRM-free PDF
Downloads handled by SendOwl.com. Payment handled via PayPal
(click "Don't have a PayPal account" to use a credit card).

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.