forked from flatplanet/Intro-To-TKinter-Youtube-Course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cursor.py
59 lines (51 loc) · 1.16 KB
/
cursor.py
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from tkinter import *
root = Tk()
root.title("Cursors")
root.geometry("500x550")
root.iconbitmap('c:/guis/exe/codemy.ico')
root.config(cursor="fleur")
list = [
"arrow",
"circle",
"clock",
"cross",
"dotbox",
"exchange",
"fleur",
"heart",
"man",
"mouse",
"pirate",
"plus",
"shuttle",
"sizing",
"spider",
"spraycan",
"star",
"target",
"tcross",
"trek",
]
count = 0
row1=0
row2=0
row3=0
row4=0
for cursor in list:
if count < 5:
Button(root, text=cursor, cursor=cursor, width=10, height=5, fg="darkblue").grid(row=row1, column=0, pady=10, padx=10)
row1 += 1
count += 1
elif count >= 5 and count < 10:
Button(root, text=cursor, cursor=cursor, width=10, height=5, fg="darkblue").grid(row=row2, column=1, pady=10, padx=10)
row2 += 1
count += 1
elif count >= 10 and count < 15:
Button(root, text=cursor, cursor=cursor, width=10, height=5, fg="darkblue").grid(row=row3, column=2, pady=10, padx=10)
row3 += 1
count += 1
else:
Button(root, text=cursor, cursor=cursor, width=10, height=5, fg="darkblue").grid(row=row4, column=4, pady=5, padx=5)
row4 += 1
count += 1
root.mainloop()