Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Tkinter收音机按钮指示灯未识别_Python_Python 2.7_Tkinter - Fatal编程技术网

Python Tkinter收音机按钮指示灯未识别

Python Tkinter收音机按钮指示灯未识别,python,python-2.7,tkinter,Python,Python 2.7,Tkinter,我希望我的单选按钮通过设置indicatoron=0来使用本页所述的按钮盒界面: 代码段: import ttk ... self.selectedSectionCode = StringVar() self.selectedSectionCode.set("abc") abcButton = ttk.Radiobutton(self, text='ABC', variable=self.selectedSectionCode, value='abc', in

我希望我的单选按钮通过设置indicatoron=0来使用本页所述的按钮盒界面:

代码段:

import ttk 

...

    self.selectedSectionCode = StringVar()
    self.selectedSectionCode.set("abc")

    abcButton = ttk.Radiobutton(self, text='ABC', variable=self.selectedSectionCode, value='abc',  indicatoron= 0)
    abcButton.grid(column=0, row=1, sticky=(N,W))
但是,当我运行代码时,会出现以下错误:

  File "C:\Users\...\view.py", line 473, in __init__
    abcButton = ttk.Radiobutton(self, text='ABC', value='abc',  indicatoron = 0)
  File "C:\Python27\lib\lib-tk\ttk.py", line 1073, in __init__
    Widget.__init__(self, master, "ttk::radiobutton", kw)
  File "C:\Python27\lib\lib-tk\ttk.py", line 560, in __init__
    Tkinter.Widget.__init__(self, master, widgetname, kw=kw)
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 1974, in __init__
    (widgetName, self._w) + extra + self._options(cnf))
clError: unknown option "-indicatoron"
我不知道为什么这不起作用,在这个网站上有几个例子提到了Radiobutton小部件使用的这个选项,用户也在使用Python2.7


我的代码中缺少什么吗?

您链接的文档是针对
Tkinter.Radiobutton
类的。您正在使用的类不支持
指示符
属性