def on_proceed(self, event): # wxGlade: promote.<event_handler>
msg="Are sure you want to delete ?"
dlg = wx.MessageDialog(self, msg,"Warning", wx.YES_NO | wx.ICON_QUESTION)
result = dlg.ShowModal()# == wx.ID_YES
if result==wx.ID_YES:
try:
self.delete()
dlg = wx.MessageDialog(self, 'Successfully deleted students from this class', '',wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
except:
dlg = wx.MessageDialog(self, 'Some error occured.Could not complete', '',wx.OK | wx.ICON_ERROR)
dlg.ShowModal()
dlg.Destroy()
self.check_list_box_1.Check(0,False)
self.button_proceed.Enable(False)
self.load_students()
event.Skip()
评论列表
文章目录