Here is my code:
import Tkinter
top = Tkinter.Tk()
top.geometry('600x600')
scale = Tkinter.Scale(top,from_=10,to=40, orient=HORIZONTAL)
scale.pack()
The following error appeared:
NameError: name 'HORIZONTAL' is not defined
I want to set my scale to be horizontal, and my reference is here but it doesn't work.
HORIZONTAL
is Tkinter
's variable. If you want to use it you have to import it or have to use like Tkinter.HORIZONTAL
If you dont want to add Tkinter
then you can do from Tkinter import HORIZONTAL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With