close

Modern Tkinter

Modern Tkinter ebook

Want TkDocs to go? If you've found the material on this site useful, please consider buying this book, which is based on the Python material in the tutorial.


Mark Roseman

p.s. your purchase helps me improve this site... thank you!

 

Only $10 for e-book. pick your format:

Paperback PDF Kindle Apple Books B&N Nook Kobo

(Slightly more for paperback. Also available on other e-book platforms.)

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:ttk::frame .frame
Ruby:frame = Tk::Tile::Frame.new(parent)
Perl:my $frame = $parent->new_ttk__frame;
Python:frame = ttk.Frame(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.