Which GUI?

Joel Lucsy jjlucsy at concentric.net
Fri Feb 18 09:42:55 EST 2000


"Moshe Zadka" <moshez at math.huji.ac.il> wrote in message
news:Pine.GSO.4.10.10002181521450.2615-100000 at sundial...
> On Fri, 18 Feb 2000, Gerrit Holl wrote:
> > I think I'll make another point 'can be subclassed' in my comparison.
> Why? In Python, subclassing is much less important then in other OO
> languages. For example, while widgets in Tkinter can be subclassed, the
> official effbotic advice is not to do so (and, I must say, I agree).
> Not to mention that Tkinter is built on _tkinter, whose widgets cannot
> be subclassed, so here is another point to the pointlessness of the
> subclass-ability.

The idea for subclassability is for creating custom controls with custom
looks. For instance, if I wanted a grid control which allowed for spacings
between the grids, or better yet, custom grid objects, how would I do this
without subclassing? Callbacks I suppose. Well, the GUI toolkit has to offer
them, which some don't. In Tkinter you can wrap a bunch of stuff into a
metawidget so one doesn't need to subclass. wxPython doesn't need
subclassing because it uses events (but you can also subclass as well). In
(py)FLTK you need to subclass in order to get these custom objects. And
because (py)FLTK doesn't have a lot of controls, it becomes paramount to be
able to do this. It just depends of the toolkit.

--
 - Joel Lucsy (jjlucsy at concentric.net)








More information about the Python-list mailing list