[Tkinter-discuss] RE: Re: making tkFileDialog and tkMessageBox modal on Win32

Greg Lee glee at pharsight.com
Thu Apr 7 01:16:51 CEST 2005


On Apr 6, 2005 1:33 PM, Michael Lange <klappnase at web.de> wrote:
> On my box (linux) the file dialog is modal, however because you didn't specify a parent to the file  dialog
> it's modal to the root window and not to the child-toplevel, so I can lift the toplevel over the file dialog,
> but as expected the toplevel's buttons do not respond. Maybe it's a system/Tk-version problem that the grab
> doesn't work for you? Anyway, you could try to pass "parent=self.top" to askopenfilename() and see what happens.


This change makes the dialog modal with respect to the child-toplevel, but not to the root window.  
(This isn't good enough because my real application has some other tasks,  I can launch them while the file dialog is up, but their rendering is fubar.)

I experimented a bit and discovered that tkFileDialog and tkMessageBox share this behavior.  
In contrast, tkSimpleDialog does not: it appears to be application modal.  If memory serves, the former use the native Win32 dialogs, but the latter does not.  


More information about the Tkinter-discuss mailing list