[英]how do you deal with the function that takes a long time in Tkinter?
我正在使用 Tkinter,我有一個 function 需要很長時間才能處理(10 分鍾),所以我想在過程結束之前顯示一個幀,然后顯示 ZC1C425268E68385D1AB5074C 所做的任何事情
class App(customtkinter.CTk):
WIDTH = 950
HEIGHT = 520
def __init__(self):
super().__init__()
self.button_3 = customtkinter.CTkButton(
master=self.frame_left,
text=" Translation",
width=160,
command=lambda: [self.waiting_func(imported_file)])
self.button_3.grid(row=4, column=0, pady=10, padx=20)
def waiting_func(self, imported_file):
fr = Frame(self.frame_right, bg="red")
fr.grid(row=1,
column=0,
rowspan=9,
columnspan=2,
pady=20,
padx=10,
sticky="nswe")
Translaion_main(self, imported_file) #this is the functin with the long process
但幀 fr 在過程結束之前(10 分鍾后)不顯示
我試過進度條也不行
有人可以幫忙嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.