Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

tkinter scale slider value not showing

below is my code for a basic tkinter scale:

root = tk.Tk()
root.geometry('150x75')
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)

root.mainloop()

below is the attached output :

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading