-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTkinter Scale [Full].py
More file actions
29 lines (21 loc) · 887 Bytes
/
Copy pathTkinter Scale [Full].py
File metadata and controls
29 lines (21 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#;==========================================
#; Title: Tkinter Scale
#; Author: @AyemunHossain
#;==========================================
from tkinter import *
root = Tk()
myslider = Scale(root, from_=1971, to=2019, resolution=1,
orient=HORIZONTAL, label="Age", tickinterval=5,
length=400, sliderlength=25)
myslider.pack()
button1 = Button(text="Watch the Value",width=15,bg="brown",
fg="white",bd=3,command=lambda :print(myslider.get()))
button1.pack(pady=20)
# resolution = Value of single part of the scale
# highlightbackground = Side border of the scale body
# troughcolor = Background of the actual scale body
# activebackground = Color of scale button when you press slider
# sliderlength = Lengeth of slider of the scale
# length = Length of the scale body
# tickinterval = Interval in value of Scale
root.mainloop()