-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCustom warning box.py
47 lines (31 loc) · 1023 Bytes
/
Custom warning box.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
#;==========================================
#; Title: Custom Warning box
#; Author: @AyemunHossain
#;==========================================
import tkinter as tk
def box():
top = tk.Toplevel()
top.title("Error")
top.geometry('150x150')
msg = tk.Message(top, text="Worng Input")
msg.pack()
button = tk.Button(top, text="Yes", width=15,bg='brown',fg='white',command=top.destroy)
button.pack(side=tk.LEFT,pady=10,padx=15)
top.tkraise()
root = tk.Tk()
root.geometry('500x500')
label = tk.Label(root, text="Welcome\nPlease login to continue")
label.pack(pady=20)
frame1 = tk.Frame(root)
frame1.pack()
label1=tk.Label(frame1,text='Email/Phone')
label2=tk.Label(frame1,text='Password')
label1.grid(row=0,column=1,sticky=tk.E)
label2.grid(row=1,column=1,sticky=tk.E)
entry1=tk.Entry(frame1)
entry2=tk.Entry(frame1)
entry1.grid(row=0,column=2)
entry2.grid(row=1,column=2)
button = tk.Button(frame1, text="Login",width=10, command=box)
button.grid(row=3,column=3)
root.mainloop()