How can I set the default value of my slider to 100 ?
self.slider = tk.Sc开发者_开发百科ale(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).
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)
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()
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论