-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblob.py
More file actions
27 lines (23 loc) · 747 Bytes
/
blob.py
File metadata and controls
27 lines (23 loc) · 747 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
import tkinter as tk
fields = ('Number of Sheep', 'Number of Zombies', 'Number of Landmines', 'Number of Iterations', 'Neighborhood size', 'Explosion size')
def makeform(root, fields):
entries = {}
for field in fields:
print(field)
row = tk.Frame(root)
lab = tk.Label(row, width=22, text=field+": ", anchor='w')
ent = tk.Entry(row)
ent.insert(0, "0")
row.pack(side=tk.TOP,
fill=tk.X,
padx=5,
pady=5)
lab.pack(side=tk.LEFT)
ent.pack(side=tk.RIGHT,
expand=tk.YES,
fill=tk.X)
entries[field] = ent
return entries
root = tk.Tk()
ents = makeform(root, fields)
root.mainloop()