Home > front end >  How to show alerts in tkinter python
How to show alerts in tkinter python

Time:01-13

I want to show Alerts in tkinter in python is there anyone anyone who can tell how to show alerts in python

CodePudding user response:

You can use tkinter.messagebox to create a pop up that display an information, warning, or error

like:

tkinter.messagebox.showwarning(title = "Ooops",message = "Please choose another file")

More here: https://docs.python.org/3/library/tkinter.messagebox.html

CodePudding user response:

add this code:

from tkinter import messagebox as mb

if you want to show an error use this:

mb.showerror(title = "", message = "")

but if you want to show a warning use this:

mb.showwarning(title = "", message = "")
  •  Tags:  
  • Related