我使用的Tkinter的GUI,我有一个问题: 我尝试做一个消息控件,当我写:AttributeError的:消息实例没有属性“包”
body = Message(top, bd = 2)
body.pack(side=RIGHT)
我得到这个错误:
body.pack(side=RIGHT)
AttributeError: Message instance has no attribute 'pack'
我不明白这becaue我在一些导游检查及允许使用“信息”这样一来,因为在这里看到的例子:http://www.tutorialspoint.com/python/tk_message.htm
有没有另外一种方法来写这个?
可能你有不同版本的Tkinter,或者你已经使用名称Message将名称空间中的其他东西导入。你的进口声明是什么样的? –
感谢您的快速响应。这里是我的import语句看起来像: 从插座进口* 从进口的base64 * 从Tkinter的进口* 从tkMessageBox进口* – arikm9
我不知道如何组织代码中的注释,林新在这里,抱歉.. – arikm9