Last active
January 29, 2020 06:37
-
-
Save mujeebishaque/3b81225a6f830c4b0c46d4469ed33079 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter | |
from tkinter import messagebox | |
main_window = tkinter.Tk() | |
main_window.withdraw() #remove the background window. | |
messagebox.showinfo('Title', "This is just a text in a message box") | |
messagebox.showerror('ERROR!', "Here are the details of the error that you faced right now.") | |
messagebox.showwarning("WARNING!", "This will only have a button with ok as text or content.") | |
messagebox.askyesno("Confirmation", "Do you really want to close the application.") | |
messagebox.askokcancel("Confirm Action", "Do you want to proceed or cancel the operation?") | |
messagebox.askretrycancel("Confirm Action", "Installation Failed, retry or cancel the operation?") | |
>funnctions | |
showinfo() | |
showwarning() | |
showerror () | |
askquestion() | |
askokcancel() | |
askyesno () | |
askretrycancel () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
user_choice = messagebox.askokcancel():