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

Function Debug

PySimpleGUI/PySimpleGUI.py:14222–14274  ·  view source on GitHub ↗

This Button has been changed in how it works!! Your button has been replaced with a normal button that has the PySimpleGUI Debugger buggon logo on it. In your event loop, you will need to check for the event of this button and then call: show_debugger_popout_window() :pa

(button_text='', size=(None, None), s=(None, None), auto_size_button=None, button_color=None, disabled=False, font=None,
          tooltip=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

14220
14221# ------------------------- NO BUTTON Element lazy function ------------------------- #
14222def Debug(button_text='', size=(None, None), s=(None, None), auto_size_button=None, button_color=None, disabled=False, font=None,
14223 tooltip=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):
14224 """
14225 This Button has been changed in how it works!!
14226 Your button has been replaced with a normal button that has the PySimpleGUI Debugger buggon logo on it.
14227 In your event loop, you will need to check for the event of this button and then call:
14228 show_debugger_popout_window()
14229 :param button_text: text in the button (Default value = '')
14230 :type button_text: (str)
14231 :param size: (w,h) w=characters-wide, h=rows-high
14232 :type size: (int, int)
14233 :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
14234 :type s: (int, int) | (None, None) | int
14235 :param auto_size_button: True if button size is determined by button text
14236 :type auto_size_button: (bool)
14237 :param button_color: button color (foreground, background)
14238 :type button_color: (str, str) | str
14239 :param disabled: set disable state for element (Default = False)
14240 :type disabled: (bool)
14241 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
14242 :type font: (str or (str, int[, str]) or None)
14243 :param tooltip: text, that will appear when mouse hovers over the element
14244 :type tooltip: (str)
14245 :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
14246 :type bind_return_key: (bool)
14247 :param focus: if focus should be set to this
14248 :type focus:
14249 :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)
14250 :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
14251 :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
14252 :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
14253 :param key: key for uniquely identify this element (for window.find_element)
14254 :type key: str | int | tuple | object
14255 :param k: Same as the Key. You can use either k or key. Which ever is set will be used.
14256 :type k: str | int | tuple | object
14257 :param visible: set initial visibility state of the Button
14258 :type visible: (bool)
14259 :param metadata: Anything you want to store along with this button
14260 :type metadata: (Any)
14261 :param expand_x: If True Element will expand in the Horizontal directions
14262 :type expand_x: (bool)
14263 :param expand_y: If True Element will expand in the Vertical directions
14264 :type expand_y: (bool)
14265 :return: returns a button
14266 :rtype: (Button)
14267 """
14268
14269 user_key = key if key is not None else k if k is not None else button_text
14270
14271 return Button(button_text='', button_type=BUTTON_TYPE_READ_FORM, tooltip=tooltip, size=size, s=s,
14272 auto_size_button=auto_size_button, button_color=theme_button_color(), font=font, disabled=disabled,
14273 bind_return_key=bind_return_key, focus=focus, pad=pad, p=p, key=user_key, k=k, visible=visible, image_data=PSG_DEBUGGER_LOGO,
14274 image_subsample=2, border_width=0, metadata=metadata, expand_x=expand_x, expand_y=expand_y)
14275
14276
14277# ------------------------- GENERIC BUTTON Element lazy function ------------------------- #

Callers

nothing calls this directly

Calls 2

ButtonClass · 0.85
theme_button_colorFunction · 0.85

Tested by

no test coverage detected