[Tutor] Multiple tabs using tkinter

Alan Gauld alan.gauld at yahoo.co.uk
Tue Feb 7 13:59:04 EST 2017


On 07/02/17 16:41, Zachary Ware wrote:

> Full disclosure, I've never actually used Tix beyond making it build
> with the rest of CPython on Windows and making sure it actually worked
> on one of my Linux buildbot workers.  I have only ever seen it as a
> maintenance headache :)

The beauty of Tix is that it is a full superset of Tkinter
so you can just put this at the top and it converts your
code to use Tix:

replace

import Tkinter

with

import Tix as Tkinter

But Tix has over 40 extra widgets including a tabbed notepad,
balloon, meter, shell and and a very powerful (but undocumented!)
grid control.

The most important and commonly used seem to have been
incorporated into the latest ttk, but not all of them.

> "Less available" rather than "unavailable" :).  Tix ships with Tcl/Tk
> with CPython on Windows; on Linux, you'd need to install it separately
> from Tcl/Tk and python/tkinter.  I honestly don't have a clue how
> you'd get it on macOS or any other platform that doesn't provide it in
> a system repository.

It should be easy since its just native Tcl code, there's no C
involved so far as I know (I haven't checked!). So anywhere Tcl
runs Tix should work.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list