我是python / Tkinter的新手。我只希望GUI中的“加速”按钮在“消息”窗口中输入文本“加速”。在支持模块中有单击该按钮所调用的功能的代码,以及在附带的GUI中具有TopLevel类的代码。.谢谢
def Accel():
textoutput.set("Accel")
class Toplevel1:
def __init__(self, top=None):
textoutput = StrVariable()
self.MsgWindow = tk.Label(top)
self.MsgWindow.place(relx=0.15, rely=0.398, relheight=0.398
, relwidth=0.693)
self.MsgWindow.configure(background="#d9d9d9")
self.MsgWindow.configure(foreground="#000000")
self.MsgWindow.configure(highlightbackground="#d9d9d9")
self.MsgWindow.configure(highlightcolor="black")
self.MsgWindow.configure(relief="sunken")
self.MsgWindow.configure(width=416)
self.MsgWindow.configure(textvariable=textoutput)
self.AccelButton.configure(command=test_support.Accel)