python message box yes no script

Solutions on MaxInterview for python message box yes no script by the best coders in the world

showing results for - "python message box yes no script"
Sakina
19 Aug 2020
1import tkinter as tk
2from tkinter import messagebox
3
4root= tk.Tk()
5
6canvas1 = tk.Canvas(root, width = 300, height = 300)
7canvas1.pack()
8
9def ExitApplication():
10    MsgBox = tk.messagebox.askquestion ('Exit Application','Are you sure you want to exit the application',icon = 'warning')
11    if MsgBox == 'yes':
12       root.destroy()
13    else:
14        tk.messagebox.showinfo('Return','You will now return to the application screen')
15        
16button1 = tk.Button (root, text='Exit Application',command=ExitApplication,bg='brown',fg='white')
17canvas1.create_window(150, 150, window=button1)
18  
19root.mainloop()
20
queries leading to this page
create confirmation pop up yes 2fno in pythonpython pop up yes or not choicepress yes 2fno in confirm dialog using pythonpress on yes or no button in window ui pythontkinter messagebox command on yespython gui message no buttondmessage box yes no pythonpython message box yes 2fnoone function that closes a popup window that has yes 2fno buttons in pythontkinter yes or nopython messagebox yes no messagebox python get yes or notkinter question boxhow to clisk on yes or no buttons in window pythonpython message to user with yes and no buttonpython simple yes 2fno dialogpython how to make a system notification with yes or no dialoguetoggle tk message box pythonpython yes or no windowin python message box with ok buttontkinter yes no popupmessage ask yes no tkinteraskokcancel tkinter yes or nnomessagebox yes no pythonho to press yes 2fno in confirm dialog using pythonhow to click on yes or no buttons on window pythonhow to use messagebox askyesorno in pythontkinter yes no messageboxtkinter messagebox yes nochoose to click on either yes or no in window ui pythonclick on yes or no in window ui pythonmessagebox question pythonpython yes no message boxbutton onclick message box in python tkintermessage box with ok button in pythonclick on yes or no button in window ui pythonautomate yes no click on buttons pythonyes no popup tkinterquestion box with pythontkinter message box yes noconfirmation window tkinterhow to press yes or no button in window using pythontkinter confirm dialogmassagebox confirm in pythonhow to create an interactive boxes with yes or no pygamemessagebox yesno pythonmessagebox tkinter yes nopython message box yes no script