Tkinter 有刷新方法吗? [英] Does Tkinter have a refresh method?
本文介绍了Tkinter 有刷新方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Tkinter.
I am using Tkinter.
import Tkinter as tk
class App(tk.Frame):
def __init__(self, *args, **kwargs):
tk.Frame.__init__(self, *args, **kwargs)
....
root = tk.Tk()
root.title("title")
app = App(root)
root.mainloop()
有刷新吗?因为我想刷新我的框架.root.refresh()
是否可行?
Does it has a refresh? Because I want to refresh my frame.
Is root.refresh()
is possible?
推荐答案
有一个 Tk.update() 和 Tk.update_idletasks().两者都会强制刷新 UI,但取决于您实际尝试执行的操作,它可能不是您要查找的内容.
There is a Tk.update() and a Tk.update_idletasks(). Both will force the UI to be refreshed, but depending on what you're actually trying to do it might not be what you're looking for.
这篇关于Tkinter 有刷新方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文