在实例化ttk.检查按钮用一些夸克。其中一个kwargs是foreground
,我得到了TclError: unknown option "-foreground"
。如果我删除foreground
,它会起作用。在
下面是调用前的代码行和值,如PyCharm中所示。。。在
widget
是ttk.Checkbutton
。这是错误。。。在
File "...widget.py", line 76, in add_widget_and_position **widget_kwargs) File "C:\Python27\lib\lib-tk\ttk.py", line 633, in __init__ Widget.__init__(self, master, 'ttk::checkbutton', kw) | | | -> {'foreground': 'purple', 'text': u'Free to air', 'width': None, 'state': 'normal', 'command': at 0x04881970>,... | | -> | -> -> File "C:\Python27\lib\lib-tk\ttk.py", line 555, in __init__ Tkinter.Widget.__init__(self, master, widgetname, kw=kw) | | | | -> {'foreground': 'purple', 'text': u'Free to air', 'width': None, 'state': 'normal', 'command': at 0x04881970>,... | | | -> 'ttk::checkbutton' | | -> | -> -> File "C:\Python27\lib\lib-tk\Tkinter.py", line 2091, in __init__ (widgetName, self._w) + extra + self._options(cnf)) TclError: unknown option "-foreground"
有人能看出我做错了什么吗?希望它简单而愚蠢:/
目前没有回答
相关问题 更多 >
编程相关推荐