进度对话框消失,而不是取消按钮在要被销毁时变为关闭按钮(并且未PD_AUTO_HIDE
设置标志)。
progressDlg = wx.ProgressDialog("Organizing music files",
"This may take some time..",
maximum=9999,
parent=self,
style = wx.PD_CAN_ABORT
|wx.PD_APP_MODAL
|wx.PD_ELAPSED_TIME)
)
progressDlg.SetSize((400, 200))
while self.working:
wx.MilliSleep(250)
progressDlg.Pulse(os.getcwd())
progressDlg.Destroy()