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

Function popup_ok

PySimpleGUI/PySimpleGUI.py:21069–21117  ·  view source on GitHub ↗

Display Popup with OK button only :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: button color (foregr

(*args, title=None, button_color=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

21067
21068# --------------------------- popup_ok ---------------------------
21069def popup_ok(*args, title=None, button_color=None, background_color=None, text_color=None, auto_close=False,
21070 auto_close_duration=None, non_blocking=False, icon=None, line_width=None, font=None,
21071 no_titlebar=False, grab_anywhere=False, keep_on_top=None, location=(None, None), relative_location=(None, None), image=None, modal=True):
21072 """
21073 Display Popup with OK button only
21074
21075 :param *args: Variable number of items to display
21076 :type *args: (Any)
21077 :param title: Title to display in the window.
21078 :type title: (str)
21079 :param button_color: button color (foreground, background)
21080 :type button_color: (str, str) | str
21081 :param background_color: color of background
21082 :type background_color: (str)
21083 :param text_color: color of the text
21084 :type text_color: (str)
21085 :param auto_close: if True window will close itself
21086 :type auto_close: (bool)
21087 :param auto_close_duration: Older versions only accept int. Time in seconds until window will close
21088 :type auto_close_duration: int | float
21089 :param non_blocking: if True the call will immediately return rather than waiting on user input
21090 :type non_blocking: (bool)
21091 :param icon: filename or base64 string to be used for the window's icon
21092 :type icon: bytes | str
21093 :param line_width: Width of lines in characters
21094 :type line_width: (int)
21095 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
21096 :type font: (str or (str, int[, str]) or None)
21097 :param no_titlebar: If True no titlebar will be shown
21098 :type no_titlebar: (bool)
21099 :param grab_anywhere: If True: can grab anywhere to move the window (Default = False)
21100 :type grab_anywhere: (bool)
21101 :param keep_on_top: If True the window will remain above all current windows
21102 :type keep_on_top: (bool)
21103 :param location: Location of upper left corner of the window
21104 :type location: (int, int)
21105 :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.
21106 :type relative_location: (int, int)
21107 :param image: Image to include at the top of the popup window
21108 :type image: (str) or (bytes)
21109 :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
21110 :type modal: bool
21111 :return: Returns text of the button that was pressed. None will be returned if user closed window with X
21112 :rtype: str | None | TIMEOUT_KEY
21113 """
21114 return popup(*args, title=title, button_type=POPUP_BUTTONS_OK, background_color=background_color, text_color=text_color,
21115 non_blocking=non_blocking, icon=icon, line_width=line_width, button_color=button_color, auto_close=auto_close,
21116 auto_close_duration=auto_close_duration, font=font, no_titlebar=no_titlebar, grab_anywhere=grab_anywhere,
21117 keep_on_top=keep_on_top, location=location, relative_location=relative_location, image=image, modal=modal)
21118
21119
21120# --------------------------- popup_ok_cancel ---------------------------

Callers

nothing calls this directly

Calls 1

popupFunction · 0.70

Tested by

no test coverage detected