[Tkinter-discuss] Disabling widgets [especially ttk.Scale]
Martin B.
spooky.ln at tbs-software.com
Mon Jan 17 17:36:52 CET 2011
hi all,
i have a little problem with setting state of ttk.Scale widget.
i have a ttk.Checkbutton which operates with ttk.Scale. [enabling,disabling]
<code>
self.check=BooleanVar()
button = ttk.Checkbutton(self, text='',variable=self.var,command=self._setActive)
self.slider = ttk.Scale(self)
def _setActive(self, event=None):
if self.check.get():
self.slider.state(statespec=('active',))
else:
self.slider.state(statespec=('disabled',))
</code>
but if i make checkbutton active, slider is disabled :(
how i make Scale state enabled and disabled if
self.slider.config(state=NORMAL) is unknown option.
sry for newbie Q.
thanks
More information about the Tkinter-discuss
mailing list