MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / popup_auto_close

Function popup_auto_close

PySimpleGUI/PySimpleGUI.py:20906–20958  ·  view source on GitHub ↗

Popup that closes itself after some time period :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: Determines

(*args, title=None, button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
                     auto_close=True, auto_close_duration=None, non_blocking=False, 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=True)

Source from the content-addressed store, hash-verified

20904
20905# --------------------------- PopupAutoClose ---------------------------
20906def popup_auto_close(*args, title=None, button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
20907 auto_close=True, auto_close_duration=None, non_blocking=False, icon=None,
20908 line_width=None, font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=None,
20909 location=(None, None), relative_location=(None, None), image=None, modal=True):
20910 """Popup that closes itself after some time period
20911
20912 :param *args: Variable number of items to display
20913 :type *args: (Any)
20914 :param title: Title to display in the window.
20915 :type title: (str)
20916 :param button_type: Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK).
20917 :type button_type: (int)
20918 :param button_color: button color (foreground, background)
20919 :type button_color: (str, str) | str
20920 :param background_color: color of background
20921 :type background_color: (str)
20922 :param text_color: color of the text
20923 :type text_color: (str)
20924 :param auto_close: if True window will close itself
20925 :type auto_close: (bool)
20926 :param auto_close_duration: Older versions only accept int. Time in seconds until window will close
20927 :type auto_close_duration: int | float
20928 :param non_blocking: if True the call will immediately return rather than waiting on user input
20929 :type non_blocking: (bool)
20930 :param icon: filename or base64 string to be used for the window's icon
20931 :type icon: bytes | str
20932 :param line_width: Width of lines in characters
20933 :type line_width: (int)
20934 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
20935 :type font: (str or (str, int[, str]) or None)
20936 :param no_titlebar: If True no titlebar will be shown
20937 :type no_titlebar: (bool)
20938 :param grab_anywhere: If True: can grab anywhere to move the window (Default = False)
20939 :type grab_anywhere: (bool)
20940 :param keep_on_top: If True the window will remain above all current windows
20941 :type keep_on_top: (bool)
20942 :param location: Location of upper left corner of the window
20943 :type location: (int, int)
20944 :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.
20945 :type relative_location: (int, int)
20946 :param image: Image to include at the top of the popup window
20947 :type image: (str) or (bytes)
20948 :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 = True
20949 :type modal: bool
20950 :return: Returns text of the button that was pressed. None will be returned if user closed window with X
20951 :rtype: str | None | TIMEOUT_KEY
20952 """
20953
20954 return popup(*args, title=title, button_color=button_color, background_color=background_color, text_color=text_color,
20955 button_type=button_type,
20956 auto_close=auto_close, auto_close_duration=auto_close_duration, non_blocking=non_blocking, icon=icon,
20957 line_width=line_width,
20958 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)
20959
20960
20961# --------------------------- popup_error ---------------------------

Callers 1

mainFunction · 0.85

Calls 1

popupFunction · 0.70

Tested by

no test coverage detected