How to use non-integer, float values for tkinter Scale widget scrollbar? How to use non-integer, float values for tkinter Scale widget scrollbar? tkinter tkinter

How to use non-integer, float values for tkinter Scale widget scrollbar?


I think that setting the option resolution instead of tickinterval (which you have set) to 0.01 or even 0.001 will cause it to at least to retrieve the value of scrollbar in that precision, e.g. 2.15 or 2.150. That could also allow you to set float values to from and to options, but I can't test it now, so it's highly possible that I'm wrong.


Assuming your interval is 0.01, you can try this.

Scale(frame, from_=0.55, to=2.75, digits = 3, resolution = 0.01, label = "Lower").pack()

You will get (digits-1) number of decimals. (In this case 2). So, 0.55,0.56, 0.57 ....., 2.75