OrangoMango

Messagebox

May 7th, 2020
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. from tkinter import messagebox
  2. from tkinter import *
  3.  
  4. tk = Tk()
  5.  
  6. '''
  7. messagebox.showinfo("Title", "Content")
  8. messagebox.showerror("Error",  "An error occured")
  9. messagebox.showwarning("Attention", "Warning")
  10. '''
  11.  
  12. variable = messagebox.askyesno("Question", "Question?")
  13. variable = messagebox.askretrycancel("Question", "Retry or cancel")
  14. variable = messagebox.askokcancel("Ok cancel", "Ok cancel box")
  15. messagebox.showinfo("Variable", variable)
  16.  
  17. tk.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment