Modern Tkinter

Will you help support TkDocs?
Write an Amazon review of Modern Tkinter
(it's based on the Python content on TkDocs)

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.

Updated by Mark Aug 29, 2020

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!

Updated by Mark Oct 9, 2020

Tk 8.6 builds on the new themed widgets from Tk 8.5.
Latest patch (8.6.11) released Dec 31 2020.

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.

Updated by Mark Feb 15, 2021


"Problems with this site? Have things you'd like to see covered here? Got Tk questions? Join the Tk Documentation and Resources mailing list or browse its archives — see its Google Groups home page.