mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 21:10:06 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
16 lines
616 B
Python
16 lines
616 B
Python
|
|
def OnClose(self, event):
|
|
|
|
if event.CanVeto() and self.fileNotSaved:
|
|
|
|
if wx.MessageBox("The file has not been saved... continue closing?",
|
|
"Please confirm",
|
|
wx.ICON_QUESTION | wx.YES_NO) != wx.YES:
|
|
|
|
event.Veto()
|
|
return
|
|
|
|
self.Destroy() # you may also do: event.Skip()
|
|
# since the default event handler does call Destroy(), too
|
|
|