[Tutor] Python and Tkinter Programming by Grayson--New Version?

Alan Gauld alan.gauld at btinternet.com
Wed Mar 18 01:12:53 CET 2009

"Chris Fuller" <cfuller084 at thinkingplanet.net> wrote

> What sets Pmw apart is the framework it provides for the creation of 
> your own
> megawidgets.

I can't comment on the PMW framework and I haven't tried it in
Python Tix but the Tcl documents claim Tix does a similar thing.
Certainly insofar as it provides a framework for creating your
own widgets.

My Tcl/Tk Nutshell book says:

"Tix adds an object oriented (AG: ie. to Tcl/Tk) framework for 
new widget types from existing widget types. Instances of these
new widget types are called mega-widgets. Tix includes over
40... and several commands for designing new ones..."

The main creation commands I see are tixWidgetClass, tixCallMethod,
tixChainMethod. There are maybe half a dozen others.

A quick look in Python Tix reveals a TixWidget class. But the
other commands are not obvuiously available - but they may
be hidden as methods of something else...

> It handles labels, forwards options from the constructor to the
> constructors of the subcomponents, forwards method calls (say your 
> megawidget
> is descended from a Frame, but the main feature is a Scale widget), 
> includes
> a set of standard data validators, etc.

It can do the forwarding of methods but I can't see any validators 

It would be interesting to do a bit of comparison, if only there were
some decent documents for Python Tix! :-(

Alan G.

More information about the Tutor mailing list