tkinter 怎么设置滚动条
请问tkinter 中,怎么给界面设置滚动条,谢谢!!!
正在学习tkinter,可以试试看这个:
import tkinter as tk
window = tk.Tk()
window.title('my window')
window.geometry('200x200')
l = tk.Label(window, bg='yellow', width=20, text='empty')
l.pack()
def print_selection(v):
l.config(text='you have selected ' + v)
s = tk.Scale(window, label='try me', from_=6, to=12, orient=tk.HORIZONTAL,
length=200, showvalue=0, tickinterval=2, resolution=0.01,
command=print_selection)
s.pack()
window.mainloop()