一、Scale的属性
Python学习笔记—— tkinter_03Button、Label_小橙子的博客-CSDN博客
二、示例from tkinter import *
#=========1.主窗口============
root = Tk()#创建主窗口
#=========2.创建、安放组件===========
scint = IntVar()
sc = Scale(root,from_=0,to=20,tickinterval = 5,variable = scint)
sc.grid(row=0,column=0)
b = Button(root,text='按钮')
b.grid(row=1,column=0)
#=========3.按钮事件============
def a(e):
print(scint.get())
b.bind('',a)
root.mainloop()#阻止窗口关闭



