Re: Gnome "Quit" menu is like clicking a button in a wxPython modal dialog

Matthias Brennwald <[email protected]> Sun, 13 Dec 2020 16:47:06 +0100
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>

On Sun, Dec 13, 2020 at 12:37, Dietmar Schwertberger 
<[email protected]> wrote:
> I have just tested with a small sample. See attachment.
> The dialog returns with wx.ID_CANCEL and then the frame receives a 
> EVT_CLOSE.
> That's correct behaviour. "Quit" triggers the EVT_CLOSE, but the 
> modal dialog needs to be closed first.

Ok, I can see how this works in your example. However, in my 
application the EVT_CLOSE does not make it the corresponding event 
handler for some reason. Any clues how / where to check this?

> If ESC/Cancel has unwanted side effects in your application, you 
> could introduce a delay. If EVT_CLOSE is received within a few ms, 
> don't perform the side effect.

I don't quite get how this would work. Where and how would I add a 
delay?
I want the "Quit" menu to do NOTHING with a modal dialog, or with a 
MessageBox. In particular, the "Quit" menu should not close a modal 
dialog or a MessageBox.

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/IUBALQ.YKIFBG68QNUD%40gmail.com.