-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path70_Entrybox.py
More file actions
36 lines (25 loc) · 799 Bytes
/
Copy path70_Entrybox.py
File metadata and controls
36 lines (25 loc) · 799 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
30
31
32
33
34
35
36
from tkinter import *
# entry widget = textbox that accepts a single line of user input
def submit():
username = entry.get()
print("Hello "+username)
entry.config(state=DISABLED)
def delete():
entry.delete(0,END)
def backspace():
entry.delete(len(entry.get())-1, END)
window = Tk()
entry = Entry(window,
font=("Arial",50),
fg="#00FF00",
bg="black",
show="*")
#entry.insert(0,'Spongebob')
entry.pack(side=LEFT)
submit_button = Button(window,text="submit",command=submit)
submit_button.pack(side=RIGHT)
delete_button = Button(window,text="delete",command=delete)
delete_button.pack(side=RIGHT)
backspace_button = Button(window,text="backspace",command=backspace)
backspace_button.pack(side=RIGHT)
window.mainloop()