MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / popup_quick

Function popup_quick

PySimpleGUI/PySimpleGUI.py:20742–20794  ·  view source on GitHub ↗

Show Popup box that doesn't block and closes itself :param *args: Variable number of items to display :type *args: (Any) :param title: Title to display in the window. :type title: (str) :param button_type: De

(*args, title=None, button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None,
                text_color=None, auto_close=True, auto_close_duration=2, non_blocking=True, icon=None, line_width=None,
                font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=None, location=(None, None), relative_location=(None, None), image=None, modal=False)

Source from the content-addressed store, hash-verified

20740
20741# --------------------------- popup_quick - a NonBlocking, Self-closing Popup ---------------------------
20742def popup_quick(*args, title=None, button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None,
20743 text_color=None, auto_close=True, auto_close_duration=2, non_blocking=True, icon=None, line_width=None,
20744 font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=None, location=(None, None), relative_location=(None, None), image=None, modal=False):
20745 """
20746 Show Popup box that doesn't block and closes itself
20747
20748 :param *args: Variable number of items to display
20749 :type *args: (Any)
20750 :param title: Title to display in the window.
20751 :type title: (str)
20752 :param button_type: Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK).
20753 :type button_type: (int)
20754 :param button_color: button color (foreground, background)
20755 :type button_color: (str, str) | str
20756 :param background_color: color of background
20757 :type background_color: (str)
20758 :param text_color: color of the text
20759 :type text_color: (str)
20760 :param auto_close: if True window will close itself
20761 :type auto_close: (bool)
20762 :param auto_close_duration: Older versions only accept int. Time in seconds until window will close
20763 :type auto_close_duration: int | float
20764 :param non_blocking: if True the call will immediately return rather than waiting on user input
20765 :type non_blocking: (bool)
20766 :param icon: filename or base64 string to be used for the window's icon
20767 :type icon: bytes | str
20768 :param line_width: Width of lines in characters
20769 :type line_width: (int)
20770 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
20771 :type font: (str or (str, int[, str]) or None)
20772 :param no_titlebar: If True no titlebar will be shown
20773 :type no_titlebar: (bool)
20774 :param grab_anywhere: If True: can grab anywhere to move the window (Default = False)
20775 :type grab_anywhere: (bool)
20776 :param keep_on_top: If True the window will remain above all current windows
20777 :type keep_on_top: (bool)
20778 :param location: Location of upper left corner of the window
20779 :type location: (int, int)
20780 :param relative_location: (x,y) location relative to the default location of the window, in pixels. Normally the window centers. This location is relative to the location the window would be created. Note they can be negative.
20781 :type relative_location: (int, int)
20782 :param image: Image to include at the top of the popup window
20783 :type image: (str) or (bytes)
20784 :param modal: If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False
20785 :type modal: bool
20786 :return: Returns text of the button that was pressed. None will be returned if user closed window with X
20787 :rtype: str | None | TIMEOUT_KEY
20788 """
20789
20790 return popup(*args, title=title, button_color=button_color, background_color=background_color, text_color=text_color,
20791 button_type=button_type,
20792 auto_close=auto_close, auto_close_duration=auto_close_duration, non_blocking=non_blocking, icon=icon,
20793 line_width=line_width,
20794 font=font, no_titlebar=no_titlebar, grab_anywhere=grab_anywhere, keep_on_top=keep_on_top, location=location, relative_location=relative_location, image=image, modal=modal)
20795
20796
20797# --------------------------- popup_quick_message - a NonBlocking, Self-closing Popup with no titlebar and no buttons ---------------------------

Callers

nothing calls this directly

Calls 1

popupFunction · 0.70

Tested by

no test coverage detected