def onClose(self,event):
dlg = wx.MessageDialog(self,message="Would you like to save the coordinates before exiting?",style = wx.YES_NO | wx.YES_DEFAULT)
result = dlg.ShowModal()
if result == wx.ID_YES:
print "Saving..."
self.onSave(event)
else:
print "Discarding changes..."
# Pass this on to the default handler.
event.Skip()
评论列表
文章目录