tkinter scale slider value not showing

below is my code for a basic tkinter scale:

root = tk.Tk()
root.resizable(width=False, height=False)
root.eval('tk::PlaceWindow . center')

v1 = tk.IntVar()

ttk.Scale(root, from_=0, to=100, orient='horizontal', variable=v1).pack(pady=20)


below is the attached output :

enter image description here

why is the slider value not showing above the slider ?

I would very much appreciate if someone could point out the error with the code.

>Solution :

There is no error in your code. I think the answer is "because it’s not designed to". There is no mention in the documentation of the ttk scale widget that it shows the value.

Leave a Reply