Features we want teach you on this post:
- Show warning
- Show error
- Ask cancel
- Ask yes no
- Ask retry cancel
1.Show warning
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.showwarning("Warning","Warning")
window.mainloop()
output:
2.Show error
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.showerror("Error","Error")
window.mainloop()
output:
3.Ask cancel
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.askokcancel("askokcancel","askokcancel")
window.mainloop()
output:
4.Ask yes no
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.askyesno("askyesno","askyesno")
window.mainloop()
output:
5.Ask retry cancel
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.askretrycancel("askretrycancel","askretrycancel")
window.mainloop()
output:
1.Like
2.Comment
3.Follow me
Top comments (0)