Tkinter: The good, the bad, and the ugly!

rantingrick rantingrick at gmail.com
Sun Jan 16 14:17:02 EST 2011


On Jan 16, 12:49 pm, Terry Reedy <tjre... at udel.edu> wrote:

> Once IDLE is revised to use some of the widgets in ttk that are not in
> tk (such as Notebook) the set would need expansion.

The IDLE library has had a NoteBook widget for ages. They just choose
to call it TabPages instead. And what is a NoteBook exactly? Well a
Notebook is a compound widget consisting of a "main frame that holds
two sub frames -- which are a "tab" frame and "pages" frame. When any
"tab" is clicked the page it is linked to is either *raised-to-the-top-
of-the-stack* OR *made-visible* depending on the design. Each "tab"
within the "tab frame" is a Radiobutton. Technically you could even
consider a RadioButton as a compound widget consisting of a button and
a label widget. And one could even dissect further the components of
any such widget however we must stop at some point. The widgets i
outlined are the highest of the lowest you'd want to consider.

I believe compound widgets have no business in the stdlib. When Guido
included Tkinter in the stdlib it was mainly for ease of introductory
GUI programming to the uninitiaed and for batteries included. However
since we do have a "batteries included" mantra we will need to hash
out which compound widgets should be included in the stdlib -- at a
later time! At this time the discussion needs to focus on defending OR
replacing Tkinter with something better. And my position is that we
cannot keep lugging around this ancient TclTk library.

> But the details of
> any such set are irrelevant to the main problems of replacement.

Not exactly. Once a library has been chosen we will need to consider a
small subset for inclusion in the stdlib and ONE large extension
library. So these problems are very relevant -- albeit out of
chronological order.






More information about the Python-list mailing list