- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI.py
More file actions
Latest commit
20 lines (15 loc) · 429 Bytes
/
Copy pathGUI.py
File metadata and controls
20 lines (15 loc) · 429 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
importtkinterastk
root=tk.Tk()
frame=tk.Frame(root)
frame.pack()
var=tk.StringVar()
var.set('hello world!')
defcall():
var.set("joke me!")
textlabel=tk.Label(root, textvariable=var)
textlabel.pack()
testButton=tk.Button(root, text='hi motherfucker', command=call)
testButton.pack()
testButton2=tk.Button(root,textvariable=var,command=root.destroy)
testButton2.pack()
root.mainloop()