How can I set the default value of my tkinter Scale widget slider to 100?
1. Set
Use the set
method
1
2
: self.scale.set(100)
2. Variable
Use the variable
option
3
4
to assign a Variable
5
6
7
self.scale_var = DoubleVar()
self.scale_var.set(1)
self.scale = tk.Scale(self.leftFrame, from_=0, to=256, orient=tk.HORIZONTAL,
command=updateValue, variable=self.scale_var)
cursor=100
?
If that doesn't work, you can always manually self.slider.set(100)
.