[英]When you call mainloop in tkinter, do you need to call it in the first window that will be opened?
[英]Do you put Frames in the mainloop() in tkinter?
我只是在學習Tkinter,我想知道是否將Frames()
放在mainloop()
。
例如:
import Tkinter
root = Tk()
f = Frame(root)
root.mainloop()
f.mainloop()
這個對嗎?
您應該在程序生命周期內只調用一次mainloop
。 通常,這是通過根窗口完成的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.