harshvinay752 / RangeSlider

Python tkinter widget for range selection in slider widget structure with two handles
MIT License
11 stars 4 forks source link

Need method to programmatically set the slider values #1

Closed dale-roberts closed 1 year ago

dale-roberts commented 2 years ago

This is a nice project! I'm using it a little video tracker to set the diameter of the object to be tracked.

It needs a way to initialize, or more generally set the values of the two sliders. I had to make a little setValues() method that calls the internal __moveBar() method twice to set the two positions to their desired initial values.

Since it uses the Tk "Variable" types, it should also probably react to changes to those values, as other Tk widgets traditionally do, so if the program updates those variables, the positions of the sliders move.

Thank you for your project!