jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
613 stars 68 forks source link

Can't disable Scale Widget in TTK-Mode #465

Closed adtzlr closed 6 years ago

adtzlr commented 6 years ago

Hello,

I found out that appJar does not disable a Scale Widget in TTK-mode. Minimal (not :blush: ) working example:

from appJar import gui
app = gui(useTtk=True)

app.addLabelScale("scale")
app.setScaleRange("scale",0,10,1)

app.disableScale("scale")

app.go()

whereas in normal (non-TTK) mode everything is fine. Thank you @jarvisteach !

jarvisteach commented 6 years ago

Hi @adtzlr - yup there are lots of little things like this where the standard functions don't work on ttk widgets.

Luckily, you can just call the ttk functions directly on the widgets once you've added them:

# adding widgets always returns the widget
sc = app.addLabelScale("scale")
app.setScaleRange("scale",0,10,1)
sc.state(["disabled"])

Oh, and thank you so much for posting example code, it makes it so much quicker to work out the issue :)

jarvisteach commented 6 years ago

Should now be resolved.