forked from slmsertbas/Test-Repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UI.py
47 lines (32 loc) · 1.37 KB
/
UI.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
40
41
42
43
44
45
46
47
from tkinter import *
from tkinter import ttk
from main import generatePass
root = Tk()
root.geometry("480x360")
root.title("Password Generator")
mainfrm = ttk.Frame(root, padding = 20)
mainfrm.grid()
global sampleText
global num
num = 0
def clicked():
text_result.set("")
sampleText = generatePass()
text_result.set(str(sampleText))
ttk.Label(frame, textvariable = text_result, pad = 5).grid(column=1)
text_result = StringVar()
text_result.set("Password")
label_pass = ttk.Label(mainfrm, textvariable=text_result).grid(column=0, row=3)
ttk.Label(mainfrm, text="Click to generate your password!").grid(column=0, row=0)
ttk.Button(mainfrm, text = "Generate Password", command = clicked).grid(column = 0, row = 1)
ttk.Button(mainfrm, text="Quit", command=root.destroy).grid(column=0, row=2)
#labelframe
frame = ttk.LabelFrame(mainfrm, text = "PASSWORDS", pad = 5)
frame.grid(column = 1, row = 0, rowspan = 5)
#
#pass1 = ttk.Label(frame, text = "Created Passwords", pad = 5).grid(column=1, row = 1)
#pass2 = ttk.Label(frame, text = "Created Passwords", pad = 5).grid(column=1, row = 2)
#pass3 = ttk.Label(frame, text = "Created Passwords", pad = 5).grid(column=1, row = 3)
#pass4 = ttk.Label(frame, text = "Created Passwords", pad = 5).grid(column=1, row = 4)
#pass5 = ttk.Label(frame, text = "Created Passwords", pad = 5).grid(column=1, row = 5)
root.mainloop()