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 users, please consider buying Modern Tkinter (paperback or e-book), which supports TkDocs.
Major Update New!
I've spent several weeks thoroughly rewriting and expanding the tutorial. You'll find improvements throughout:
- 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!
Tk 8.6 builds on the new themed widgets from Tk 8.5.
Latest patch (8.6.10) released November 2019.
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 third alpha of Tk 8.7 was released November 28th 2019.