-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessageboxlist.py
More file actions
39 lines (27 loc) · 1.13 KB
/
messageboxlist.py
File metadata and controls
39 lines (27 loc) · 1.13 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
import tkinter as tk
from tkinter import messagebox,Entry,StringVar,Button
win=tk.Tk()
win.title("MessageBox Widget")
win.geometry("400x400")
v1=StringVar()
def click_me():
#messagebox.showwarning("System Tell",message="This is warning")
#res=messagebox.askyesno("Confirmation From System",message="Are You Sure")
#res=messagebox.askretrycancel("Confirmation From System",message="Are You Sure")
#res=messagebox.askokcancel("Confirmation From System",message="Are You Sure")
#res=messagebox.askyesnocancel("Confirmation From System",message="Are You Sure")
res=messagebox.askquestion("Confirmation From System",message="Are You Sure")
print(res)
if res=='yes':
messagebox.showinfo("System Tell",message="Yes Return")
else:
messagebox.showinfo("System Tell",message="No Return")
'''if res==True:
messagebox.showinfo("System Tell",message="Yes")
else:
messagebox.showinfo("System Tell",message="No")'''
tx1=Entry(win,textvariable=v1)
tx1.place(x=200,y=100)
bt1=Button(win,text="Here!",bg="cyan",command=click_me)
bt1.place(x=230,y=150)
win.mainloop()