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

Function popup_error

PySimpleGUI/PySimpleGUI.py:20962–21012  ·  view source on GitHub ↗

Popup with colored button and 'Error' as button text :param *args: Variable number of items to display :type *args: (Any) :param title: Title to display in the window. :type title: (str) :param button_color: b

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

20960
20961# --------------------------- popup_error ---------------------------
20962def popup_error(*args, title=None, button_color=(None, None), background_color=None, text_color=None, auto_close=False,
20963 auto_close_duration=None, non_blocking=False, icon=None, line_width=None, font=None,
20964 no_titlebar=False, grab_anywhere=False, keep_on_top=None, location=(None, None), relative_location=(None, None), image=None, modal=True):
20965 """
20966 Popup with colored button and 'Error' as button text
20967
20968 :param *args: Variable number of items to display
20969 :type *args: (Any)
20970 :param title: Title to display in the window.
20971 :type title: (str)
20972 :param button_color: button color (foreground, background)
20973 :type button_color: (str, str) | str
20974 :param background_color: color of background
20975 :type background_color: (str)
20976 :param text_color: color of the text
20977 :type text_color: (str)
20978 :param auto_close: if True window will close itself
20979 :type auto_close: (bool)
20980 :param auto_close_duration: Older versions only accept int. Time in seconds until window will close
20981 :type auto_close_duration: int | float
20982 :param non_blocking: if True the call will immediately return rather than waiting on user input
20983 :type non_blocking: (bool)
20984 :param icon: filename or base64 string to be used for the window's icon
20985 :type icon: bytes | str
20986 :param line_width: Width of lines in characters
20987 :type line_width: (int)
20988 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
20989 :type font: (str or (str, int[, str]) or None)
20990 :param no_titlebar: If True no titlebar will be shown
20991 :type no_titlebar: (bool)
20992 :param grab_anywhere: If True: can grab anywhere to move the window (Default = False)
20993 :type grab_anywhere: (bool)
20994 :param keep_on_top: If True the window will remain above all current windows
20995 :type keep_on_top: (bool)
20996 :param location: Location of upper left corner of the window
20997 :type location: (int, int)
20998 :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.
20999 :type relative_location: (int, int)
21000 :param image: Image to include at the top of the popup window
21001 :type image: (str) or (bytes)
21002 :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
21003 :type modal: bool
21004 :return: Returns text of the button that was pressed. None will be returned if user closed window with X
21005 :rtype: str | None | TIMEOUT_KEY
21006 """
21007 tbutton_color = DEFAULT_ERROR_BUTTON_COLOR if button_color == (None, None) else button_color
21008 return popup(*args, title=title, button_type=POPUP_BUTTONS_ERROR, background_color=background_color, text_color=text_color,
21009 non_blocking=non_blocking, icon=icon, line_width=line_width, button_color=tbutton_color,
21010 auto_close=auto_close,
21011 auto_close_duration=auto_close_duration, font=font, no_titlebar=no_titlebar, grab_anywhere=grab_anywhere,
21012 keep_on_top=keep_on_top, location=location, relative_location=relative_location, image=image, modal=modal)
21013
21014
21015# --------------------------- popup_cancel ---------------------------

Callers 5

theme_button_colorFunction · 0.85
popup_get_dateFunction · 0.85
execute_get_resultsFunction · 0.85
upgrade_PySimpleGUI_guiFunction · 0.85

Calls 1

popupFunction · 0.70

Tested by

no test coverage detected