tkinterに1つのチェックボタンを付けることはできますか?チェックされていれば、他のチェックボタンもチェックしますか?tkinterで1つのチェックボタンを作って他のすべてのチェックボタンをチェックすることはできますか?
例:
Checkbutton(root, text="A").grid(row=0, column=0, sticky=W)
Checkbutton(root, text="B").grid(row=1, column=0, sticky=W)
Checkbutton(root, text="C").grid(row=2, column=0, sticky=W)
Checkbutton(root, text="ABC").grid(row=3, column=0, sticky=W)
ですから、ABCボタンをチェックするならば、他のすべてのボタンがaswell確認になるだろう。私が欲しいものを達成するための方法はありますか?
のPython:3.4
OS:Windowsの
私はこの取得:はAttributeError:「をNoneType」オブジェクトを使用していない、あなたはコードを置く方法 – Lojas
「を選択解除」は属性を持っていません。グリッドを同じ行に配置します。 Haldean Brownと私のようにします:foo = Checkbutton(...)、そして 'foo.grid()'、 'foo.unselect()' –