> It's not useless if, as appears to be the case here,
> the class in question is implementing a modal dialog.
> On the contrary, I think it's actually rather elegant,
> if a bit surprising!
Thanks for confirming that I'm not completely out of my mind doing
things this way :)
Seriously, I'm sure
Alan Gauld wrote:
Using a class is very unusual and has several drawbacks.
The main one is that Tkinter calls the call-back object which
in the case of a class creates a new instance. So you are
constantly creating new objects to which you have no
reference so cannot call their methods
It's no
"Nemes Andrei" wrote
Better yet, is there a nicer way to do syntax highlighting?
Take a look at the IDLE source - it is all in Python/Tkinter
and available in the standard distribution.
It seems to handle syntax highlighting OK...
HTH,
--
Alan Gauld
Author of the Learn to Program web si
"Bob van der Poel" wrote
> I was setting up a menu call back to a Class with code like:
>
> Button(bf, text=txt, height=1, command=cmd).grid(column=c, row=0,
> pady=5)
I got some help over in comp.python on this. Apparently there was a
change between 2.6 and 2.7. There are 3 easy solutions:
"psao pollard-flamand" wrote
You know when you click a tkinter button and the
window usually freezes until its done?
Actually it doesn't *usually* freeze because most Tkinter
apps are designed to prevent that :-)
Does any one know how to stop that?
The key here is that GUI event handl