MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / FolderBrowse

Function FolderBrowse

PySimpleGUI/PySimpleGUI.py:13388–13439  ·  view source on GitHub ↗

:param button_text: text in the button (Default value = 'Browse') :type button_text: (str) :param target: target for the button (Default value = (ThisRow, -1)) :type target: str | (int, int) :param initial_folder: starting path for folders and f

(button_text='Browse', target=(ThisRow, -1), initial_folder=None, tooltip=None, size=(None, None), s=(None, None),
                 auto_size_button=None, button_color=None, disabled=False, change_submits=False, enable_events=False,
                 font=None, 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

13386
13387# ------------------------- FOLDER BROWSE Element lazy function ------------------------- #
13388def FolderBrowse(button_text='Browse', target=(ThisRow, -1), initial_folder=None, tooltip=None, size=(None, None), s=(None, None),
13389 auto_size_button=None, button_color=None, disabled=False, change_submits=False, enable_events=False,
13390 font=None, pad=None, p=None, key=None, k=None, visible=True, metadata=None, expand_x=False, expand_y=False):
13391 """
13392 :param button_text: text in the button (Default value = 'Browse')
13393 :type button_text: (str)
13394 :param target: target for the button (Default value = (ThisRow, -1))
13395 :type target: str | (int, int)
13396 :param initial_folder: starting path for folders and files
13397 :type initial_folder: (str)
13398 :param tooltip: text, that will appear when mouse hovers over the element
13399 :type tooltip: (str)
13400 :param size: (w,h) w=characters-wide, h=rows-high
13401 :type size: (int, int)
13402 :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
13403 :type s: (int, int) | (None, None) | int
13404 :param auto_size_button: True if button size is determined by button text
13405 :type auto_size_button: (bool)
13406 :param button_color: button color (foreground, background)
13407 :type button_color: (str, str) | str
13408 :param disabled: set disable state for element (Default = False)
13409 :type disabled: (bool)
13410 :param change_submits: If True, pressing Enter key submits window (Default = False)
13411 :type enable_events: (bool)
13412 :param enable_events: Turns on the element specific events.(Default = False)
13413 :type enable_events: (bool)
13414 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
13415 :type font: (str or (str, int[, str]) or None)
13416 :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)
13417 :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
13418 :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
13419 :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
13420 :param key: Used with window.find_element and with return values to uniquely identify this element
13421 :type key: str | int | tuple | object
13422 :param k: Same as the Key. You can use either k or key. Which ever is set will be used.
13423 :type k: str | int | tuple | object
13424 :param visible: set initial visibility state of the Button
13425 :type visible: (bool)
13426 :param metadata: Anything you want to store along with this button
13427 :type metadata: (Any)
13428 :param expand_x: If True Element will expand in the Horizontal directions
13429 :type expand_x: (bool)
13430 :param expand_y: If True Element will expand in the Vertical directions
13431 :type expand_y: (bool)
13432 :return: The Button created
13433 :rtype: (Button)
13434 """
13435
13436 return Button(button_text=button_text, button_type=BUTTON_TYPE_BROWSE_FOLDER, target=target,
13437 initial_folder=initial_folder, tooltip=tooltip, size=size, s=s, auto_size_button=auto_size_button,
13438 disabled=disabled, button_color=button_color, change_submits=change_submits,
13439 enable_events=enable_events, font=font, pad=pad, p=p, key=key, k=k, visible=visible, metadata=metadata, expand_x=expand_x, expand_y=expand_y)
13440
13441
13442# ------------------------- FILE BROWSE Element lazy function ------------------------- #

Callers 2

popup_get_folderFunction · 0.85

Calls 1

ButtonClass · 0.85

Tested by

no test coverage detected