-
Notifications
You must be signed in to change notification settings - Fork 345
/
forget_grid.py
39 lines (28 loc) · 851 Bytes
/
forget_grid.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
from tkinter import *
root = Tk()
root.title('Codemy.com - Learn To Code!')
root.iconbitmap('c:/gui/codemy.ico')
root.geometry("400x400")
#myLabel = Label(root)
'''def myDelete():
myLabel.grid_forget()
#myLabel.destroy()
myButton['state'] = NORMAL
#print(myButton.winfo_exists())
'''
def myClick():
global myLabel
myLabel = Label(root)
myLabel.destroy()
hello = "Hello " + e.get()
myLabel = Label(root, text=hello)
e.delete(0, 'end')
myLabel.grid(row=3, column=0, pady=10)
#myButton['state'] = DISABLED
e = Entry(root, width=17, font=('Helvetica', 30))
e.grid(row=0, column=0, padx=10, pady=10)
myButton = Button(root, text="Enter Your Name", command=myClick)
myButton.grid(row=1, column=0, pady=10)
#DeleteButton = Button(root, text="Delete Text", command=myDelete)
#DeleteButton.grid(row=2, column=0, pady=10)
root.mainloop()