# L-32 MCS 260 Fri 9 Nov 2007 : showscale.py # # Illustration of the widget Scale. from Tkinter import * top = Tk() top.title('the widget Scale') low = 0.0 # lowest value high = 1.0 # highest value f = DoubleVar() # variable to scale s = Scale(top,orient='horizontal',\ from_=low,to=high,\ tickinterval=(high-low)/5.0,\ resolution=(high-low)/100.0,\ length=300,variable=f) s.set(0.5) # initialize f to 0.5 s.pack() top.mainloop()