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)
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
?
If that doesn't work, you can always manually self.slider.set(100)
.
self.slider= tk.Scale(self.leftFrame, from_=0, to=256,orient=tk.HORIZONTAL,
command=updateValue)
self.slider.set(1)//or what ever value you want
self.slider.pack()
first give a name to scale then use set with value and at last pack()
© 2022 - 2024 — McMap. All rights reserved.