download_window = Toplevel(root) download_window.title('更新新版本软件') download_window.geometry('300x150+350+250') save_btn = Button(download_window, text='下载新版本检查工具', command=save_check_tool) save_btn.pack() download_progress = tkinter.ttk.Progressbar(download_window) download_progress.pack() download_window.protocol("WM_DELETE_WINDOW", close_download) download_window.focus_set() #获得焦点 download_window.grab_set() #禁用其他窗口 download_window.wait_window() #窗口关闭前等待执行
标签:模态,set,窗口,window,download,tkinter,save From: https://www.cnblogs.com/hushaojun/p/17297226.html