如何将 tkinter Scale 小部件滑块的默认值设置为 100?

2022-01-24 00:00:00 python tkinter slider tkinter-scale

问题描述

如何将滑块的默认值设置为 100?

How can I set the default value of my slider to 100 ?

self.slider = tk.Scale(self.leftFrame, from_=0, to=256, orient=tk.HORIZONTAL, command=updateValue)


解决方案

cursor=100?

如果这不起作用,您可以随时手动self.slider.set(100).

If that doesn't work, you can always manually self.slider.set(100).

相关文章