【发布时间】:2014-11-01 12:06:44
【问题描述】:
我已经制作了一个文本框和一个按钮。单击按钮时,它应在文本框中显示内容。
我遵循了一个教程,但我无法让它工作,所以我来到这里并找到了一个 thread 其他人有这个问题,但我仍然无法弄清楚为什么我的会出现这个错误.
AttributeError: 'NoneType' object has no attribute 'get'
这里是代码。
def send_feedback(*args):
feedback = self.MyEntryBox.get("0.0",'END-1c')
print(feedback)
self.MyEntryBox = Text(SWH, width=80, height=20, bd=5, fg="#0094FF",relief = RIDGE).place(x=200,y=400)
SubmitButton = Button(SWH, text="Submit", fg="White", bg="#0094FF", font=("Grobold",20),command=send_feedback).pack()
【问题讨论】: