【发布时间】:2016-11-02 05:40:02
【问题描述】:
我在开发 Python ttk 代码期间使用单独的顶级窗口,并希望从根目录发送消息以调试顶级窗口。
这是一些伪代码
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 中:
from Tkinter import *
import ttk
def SetupMyFunct(root):
f = ttk.Frame(root).grid()
w = Frame(f).grid()
此时我想发送一些文本以在 de_bug 窗口中自动更新,但我真的不知道从哪里开始。
请帮忙? 标记。
【问题讨论】: