MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / Quit

Function Quit

PySimpleGUI/PySimpleGUI.py:13977–14022  ·  view source on GitHub ↗

:param button_text: text in the button (Default value = 'Quit') :type button_text: (str) :param size: (w,h) w=characters-wide, h=rows-high :type size: (int, int) :param s: Same as size parameter. It's an alias. If EITHER of th

(button_text='Quit', size=(None, None), s=(None, None), auto_size_button=None, button_color=None, disabled=False, tooltip=None,
         font=None, bind_return_key=False, focus=False, pad=None, p=None, key=None, k=None, visible=True, metadata=None, expand_x=False, expand_y=False)

Source from the content-addressed store, hash-verified

13975
13976# ------------------------- QUIT BUTTON Element lazy function ------------------------- #
13977def Quit(button_text='Quit', size=(None, None), s=(None, None), auto_size_button=None, button_color=None, disabled=False, tooltip=None,
13978 font=None, bind_return_key=False, focus=False, pad=None, p=None, key=None, k=None, visible=True, metadata=None, expand_x=False, expand_y=False):
13979 """
13980
13981 :param button_text: text in the button (Default value = 'Quit')
13982 :type button_text: (str)
13983 :param size: (w,h) w=characters-wide, h=rows-high
13984 :type size: (int, int)
13985 :param s: Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used
13986 :type s: (int, int) | (None, None) | int
13987 :param auto_size_button: True if button size is determined by button text
13988 :type auto_size_button: (bool)
13989 :param button_color: button color (foreground, background)
13990 :type button_color: (str, str) | str
13991 :param disabled: set disable state for element (Default = False)
13992 :type disabled: (bool)
13993 :param tooltip: text, that will appear when mouse hovers over the element
13994 :type tooltip: (str)
13995 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
13996 :type font: (str or (str, int[, str]) or None)
13997 :param bind_return_key: (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options
13998 :type bind_return_key: (bool)
13999 :param focus: if focus should be set to this
14000 :type focus: (bool)
14001 :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int)
14002 :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
14003 :param p: Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used
14004 :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
14005 :param key: key for uniquely identify this element (for window.find_element)
14006 :type key: str | int | tuple | object
14007 :param k: Same as the Key. You can use either k or key. Which ever is set will be used.
14008 :type k: str | int | tuple | object
14009 :param visible: set initial visibility state of the Button
14010 :type visible: (bool)
14011 :param metadata: Anything you want to store along with this button
14012 :type metadata: (Any)
14013 :param expand_x: If True Element will expand in the Horizontal directions
14014 :type expand_x: (bool)
14015 :param expand_y: If True Element will expand in the Vertical directions
14016 :type expand_y: (bool)
14017 :return: returns a button
14018 :rtype: (Button)
14019 """
14020 return Button(button_text=button_text, button_type=BUTTON_TYPE_READ_FORM, tooltip=tooltip, size=size, s=s,
14021 auto_size_button=auto_size_button, button_color=button_color, font=font, disabled=disabled,
14022 bind_return_key=bind_return_key, focus=focus, pad=pad, p=p, key=key, k=k, visible=visible, metadata=metadata, expand_x=expand_x, expand_y=expand_y)
14023
14024
14025# ------------------------- Exit BUTTON Element lazy function ------------------------- #

Callers

nothing calls this directly

Calls 1

ButtonClass · 0.85

Tested by

no test coverage detected