在开发pythontttk代码的过程中,我使用了一个单独的顶层窗口,并希望从root用户向debug顶层窗口发送消息。在
这是一些伪代码
from Tkinter import *
import ttk
from MyFunctions import * # some code I wrote (see below)
root = Tk()
SetupMyFunct(root) # see below
de_bug = Toplevel(root)
dbug_frame = Frame(de_bug).grid()
debug_string1 = StringVar()
debug1_window = ttk.Label(dbug_frame, textvariable = debug_string1).grid()
root.mainloop()
在我的MyFunctions.py公司名称:
^{pr2}$在这一点上,我想发送一些文本自动更新在de_bug窗口,但我真的不知道从这里到哪里去。在
请帮忙? 作记号。在
链接几何管理方法会阻止您保留对这些小部件的引用,因为这些方法返回存储在这些变量中的
None
。别这样。这将允许您做一些事情,比如使用对小部件的引用。具体地说,您将能够将dbug_frame
指定为debug1_window
小部件的父对象。在在
^{pr2}$相关问题 更多 >
编程相关推荐