(n00b) Tkinter trouble

Jason Swails jason.swails at gmail.com
Tue Nov 15 00:18:28 EST 2011


On Mon, Nov 14, 2011 at 3:49 AM, Chris Angelico <rosuav at gmail.com> wrote:

> On Mon, Nov 14, 2011 at 6:11 PM, Jason Swails <jason.swails at gmail.com>
> wrote:
> > Then, I can reactivate all of the buttons in the destroy() method before
> > calling the destroy() method of Toplevel on self.
>
> Small side point that might save you some work: Instead of disabling
> and enabling all the buttons, disable the whole window. I don't know
> Tkinter well enough to know if there's an easy way to create a modal
> window, but the thing to do is to disable the entire window rather
> than just its command buttons - that's the least astonishing[1] user
> interface technique.
>

Of course!  Windows are widgets just like everything else is, and so can be
configured to be in the DISABLED state just like a button can.  I'm not
used to this hierarchy in which the root window presides over all, yet is
still a widget just like everything else.

But there's a lot of GUI programming that I haven't wrapped my head around
yet (which is why I'm running with this pet project -- but it's bound to be
ugly :)).

Thanks!
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111115/ac641fea/attachment-0001.html>


More information about the Python-list mailing list