I had to add a little bit to make the dialog modal to the parent. So anyway,
here’s to helping! : )
My comments are prefaced with an #A:, and my modifications are surrounded by
the #A tag, #A - #/A, that is.
def tk_wrapgrab(tk, f, kw):
#retrieved from:
http://grokbase.com/t/python/tkinter-d
On Fri Apr 8 03:04:10 CEST 2005, jepeler wrote:
>If window B is not modal, (you can still work with window A while it's
>displayed) then why do you want the dialog which is conceptually the child of B
>to block interaction with A? Maybe the behavior you saw on Windows is
>correct for this reason.
On Thu, Apr 07, 2005 at 05:52:57PM -0700, Greg Lee wrote:
> ps: is the need to use the grab function a bug or something
> I should have expected?
Good question.
The behavior has been this way in Tk since the introduction of the
Windows-native dialogs. If it hasn't been fixed in that time, the T
jepler's suggestion seems to solve the problem:
# Wrap a dialog in a grab pair.
# Use to make tkFileDialog and tkMessageBox application-modal.
# Not needed for tkSimpleDialog.
# tk - grab target
# f - tkFileDialog.askopenfilename, tkMessageBox.showinfo, etc.
# kw - dictionary of key-word arguments
Good observation, Michael! That was the ticket, at least for me when
I run Greg's sample app on WinXP with Python 2.4.1
cheers
S
On Apr 6, 2005 1:33 PM, Michael Lange <[EMAIL PROTECTED]> wrote:
> On my box (linux) the file dialog is modal, however because you didn't
> specify a parent to the f
On Wed, 6 Apr 2005 11:04:50 -0700
"Greg Lee" <[EMAIL PROTECTED]> wrote:
> The esteemed Fredrik Lundh responded:
>
> > well, they sure are modal on my machine. maybe you could post an example,
> > tell
> > us how it behaves on your machine, and tell us how you expected it to
> > behave.
>
> I,
The esteemed Fredrik Lundh responded:
> well, they sure are modal on my machine. maybe you could post an example,
> tell
> us how it behaves on your machine, and tell us how you expected it to behave.
I, too, have seen the file dialogs behave modally on my machine---but not
always.
This follo