Create a MessageBox

Create a MessageBox :
To show a message box using Tkinter, you can use messagebox library like this:

1. from tkinter import messagebox
2. messagebox.showinfo(‘Message title’ , ‘Message content’)

Pretty easy!!

Let’s show a message box when the user clicks a button.

Screenshot (30)
The output of the above code is shown below:
Screenshot (31)

And when you will press the created button, a messagebox will appear on the screen as shown below:

Screenshot (32)

 

 

                                                                                                                    Blog written by:

                                                                                                                    Rohit Sharma

Leave a comment