Possible Win32 Tkinter bug?

David LeBlanc whisper at oz.net
Fri Nov 15 16:48:28 EST 2002


It sounds to me as though you don't have the right modality set for the
message box or something is messed up about your tkinter installation.

Windows has 3 dialog modalities:

application modal - the dialog gets the focus, the main app is disabled and
control returns to the app when the dialog is dismissed. IIRC, this is what
a tkMessageBox is by default and there's no option to change the modality.
system modal - the dialog gets the focus, all apps are disabled and control
returns to the app when the dialog is dismissed.
non modal - the dialog is essentially an independent window. all other apps
are responsive, including the app that launched the dialog. The app next in
the z-order would get the focus when the dialog is dismissed.

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Tim Daneliuk
> Sent: Friday, November 15, 2002 2:10
> To: python-list at python.org
> Subject: Re: Possible Win32 Tkinter bug?
>
>
> Eric Brunel wrote:
> <SNIP>
> >
> > Windows has a quite different idea on which window should get the focus
> > than any other window manager on other platforms. We often
> encountered such
> > strange behaviours.
> >
> > Did you try to explicitely do a tkraise and/or focus_set on the
> main window
> > after your message box has been shown? It may help. I also once
> saw that
> > calling successively withdraw(), then deiconify() on the main
> window can
> > solve such problems.
> >
> > In other words: you're on Windows, so the standard way to do
> things is to
> > hack until you get the behaviour you want... ;-)
> >
> > HTH
>
>
> Thanks - I'll look into it...
> --
> ------------------------------------------------------------------
> ------------
> Tim Daneliuk
> tundra at tundraware.com
>
> --
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list