Python have many libraries for GUI . Tkinter is one of the libraries that provides a Graphical user interface. For the Short Message, we can use the MessageBox Library. It has many functions for the effective interface. In this MessageBox library provide different type of functions to Display Message Box .
- showinfo():- To display some usual Information
- showwarning():- To display warning to the User
- showerror():- To display differnt type of Error
- askquestion():- to Ask Query to the User
By default, the size of the message box is Fix. We can’t change the size of that Message Box. Different Boxes have different sizes. However, we can use Different alternative methods for this purpose
- Message Widget
- By Chaging ReadMe File
1. Message Widget
MessageBox library doesn’t provide the functions to change the configuration of the box. We can use the other function. The message can also be used to display the information. The size of the message is the size of the window so that we can set the size of the message by geometry, pack.
2. By Changing ReadMe File
This is another alternative option of the Message Box. In this, We are Opening the file readme.txt the length of the content of the readme file determines the size of the messagebox.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.