from Tkinter import * def sel(): selection = "Value = " + str(var.get()) label.config(text = selection) root = Tk() var = DoubleVar() scale = Scale(root, variable=var) button = Button(root, text="Get Scale Value", command=sel) label = Label(root) scale.pack(anchor=CENTER) button.pack(anchor=CENTER) label.pack() root.mainloop()
18.27.Scale | ||||
18.27.1. | Scale with variable | |||
18.27.2. | Get scale value | |||
18.27.3. | Label, Button, and Scale Demo | |||
18.27.4. | Scale used to control the size of a circle. | |||
18.27.5. | Scale Widgets | |||
18.27.6. | Show current value of Scale | |||
18.27.7. | Scale properties setting in constructor |