def on_delete(self, event): # wxGlade: student_profie.<event_handler>
self.button_delete.Disable()
self.button_save.Disable()
self.db_delete()
self.clear_student_details()
self.bitmap_photo.Enable(False)
cur_dir=os.path.dirname(os.path.abspath((sys.argv[0])))
path=cur_dir+"/Resources/profile_pic/"+str(self.current_admission_no)+".jpg"
if os.path.isfile(path):
path=cur_dir+"/Resources/profile_pic/"+str(self.current_admission_no)+".jpg"
os.remove(path)
path=cur_dir+"/Resources/img/browse.jpg"
self.bitmap_photo = wx.BitmapButton(self.panel_1, wx.ID_ANY,wx.Bitmap(path, wx.BITMAP_TYPE_ANY))
self.__set_properties()
self.__do_layout()
event.Skip()
评论列表
文章目录