Modern Tkinter
Tk is the only cross-platform (Windows, Mac, Unix) graphical user interface toolkit designed exclusively for high-level dynamic languages, like Python, Tcl, Ruby, Perl, and many others. Whatever language you use, this site brings you the current, high-quality essential information you need to get the most out of Tk.

Modern Tk Best Practices

Learn the latest modern Tk features and make better GUI's.

The TkDocs tutorial makes it fast and easy to learn what you need. It supplements the existing, often-outdated documentation available for Tk, especially focusing on the innovations found in Tk 8.5 and beyond. This "newer" Tk is so much better than the old and cruddy "classic" Tk you may be familiar with. For some more on the "what" and "why" of this site, have a peek at the about page.

python logo Python users, please consider buying Modern Tkinter (paperback or e-book), which supports TkDocs.

Nov/2021: Many small corrections throughout tutorial and book (ebook purchasers can update).

Updated by Mark Nov 20, 2021

Major Update

If you haven't checked out the tutorial in a while, you'll find...

  • Over 20% more: new topics, in-depth explanations, code examples, illustrations, best practices, ...
  • An all-new chapter on the event loop, and additional coverage of event bindings, input validation, variable tracing, window and screen attributes, new widget features, font chooser, third-party themes, ...
  • Complete revamp of Tk installation instructions (all platforms and languages!) to work with the latest versions: Tk 8.6.10, Python 3.9, ...
  • Hundreds of fixes and cleanups to examples, structure, consistency, formatting, grammar, spelling... (sorry!)

I've also updated site navigation, formatting, etc. It's the biggest change since TkDocs launched in 2008!

Updated by Mark Oct 9, 2020

Tk 8.6 builds on the themed widgets introduced in Tk 8.5.
Latest patch (8.6.12) released Nov 5 2021.

8.6.12 (included in recent binaries of Python 3.10) has important fixes for macOS Monterey.

With over ten years of maturity under its belt, 8.6 should be for most people the Tk version of choice. Despite how much of a step forward 8.5 and 8.6 are, remember that people running their older Tk programs in the new version won't see a difference. Programs need to switch from the "classic" Tk widgets to the new themed "ttk::" widgets. Luckily this is not difficult, but you need to know the new stuff is there!

Looking to the future, the fifth alpha of Tk 8.7 was released Jun 18th 2021.

Updated by Mark Nov 17, 2021