-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathc-177 hw..py
More file actions
65 lines (44 loc) · 1.76 KB
/
c-177 hw..py
File metadata and controls
65 lines (44 loc) · 1.76 KB
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
60
61
62
63
64
65
from tkinter import*
root = Tk()
root.minsize(650,650)
root.maxsize(650,650)
root.title('Encapsulation')
class userDB:
def __init__(self):
self.__username = "Amulya"
self.__password = "shells16"
self.captcha = "123"
def showUser(self):
label_name.config(text="Name : " + self.__username)
label_password.config(text="Password : " + self.__password)
label_captcha.config(text="Captcha : " + self.captcha)
user = userDB()
label_name= Label(root,text="Name : ")
label_name.place(relx=0.3,rely=0.1,anchor=CENTER)
label_password= Label(root,text="Password : ")
label_password.place(relx=0.3,rely=0.2,anchor=CENTER)
label_captcha= Label(root,text="Captcha : ")
label_captcha.place(relx=0.3,rely=0.3,anchor=CENTER)
entry_name= Entry(root)
entry_name.place(relx=0.5,rely=0.1,anchor=CENTER)
entry_password= Entry(root)
entry_password.place(relx=0.5,rely=0.2,anchor=CENTER)
entry_captcha= Entry(root)
entry_captcha.place(relx=0.5,rely=0.3,anchor=CENTER)
output_name=Label(root)
output_name.place(relx=0.5,rely=0.7,anchor=CENTER)
output_password=Label(root)
output_password.place(relx=0.5,rely=0.8,anchor=CENTER)
output_captcha=Label(root)
output_captcha.place(relx=0.5,rely=0.9,anchor=CENTER)
def addUser():
global user
user.__username = entry_name.get()
user.__password = entry_password.get()
user.captcha = entry_captcha.get()
print("Details Updated")
show_profile_button = Button(root, text="Show Profile", command=user.showUser)
show_profile_button.place(relx=0.7, rely=0.5, anchor="center")
update_button = Button(root, text="Update Login Details", command=addUser)
update_button.place(relx=0.2, rely=0.5, anchor="center")
root.mainloop()