robertlugg / easygui

easygui for Python
http://easygui.readthedocs.org/en/master/
BSD 3-Clause "New" or "Revised" License
451 stars 114 forks source link

Popup Box with Auto-Close #220

Closed shansaju closed 11 months ago

shansaju commented 12 months ago

Feature Description: Popup Box with Auto-Close

The new feature aims to add a popup box to the EasyGUI library that automatically closes after a specified duration without requiring any user interaction. This popup box is useful for displaying short messages or notifications to the user that should disappear after a certain period, providing a non-intrusive way to present information.

Function Signature:

The function that implements this feature might have a signature like this:

def popupmsg(msg: str, timeout: int, title: str = "Popup Message", padx: int = 10, pady: int = 10, ipadx: int = 0, ipady: int = 0):

Where:

Usage Example:

popupmsg("Hello, this is a popup message!", timeout=5000, title="Custom Title")

This code will display a popup box with the message "Hello, this is a popup message!" and the title "Custom Title". The popup will automatically close after 5 seconds (5000 milliseconds) without requiring any user interaction.