MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / FileSaveAs

Function FileSaveAs

PySimpleGUI/PySimpleGUI.py:13564–13619  ·  view source on GitHub ↗

:param button_text: text in the button (Default value = 'Save As...') :type button_text: (str) :param target: key or (row,col) target for the button (Default value = (ThisRow, -1)) :type target: str | (int, int) :param file_types: Defa

(button_text='Save As...', target=(ThisRow, -1), file_types=FILE_TYPES_ALL_FILES, initial_folder=None,
               default_extension='', disabled=False, tooltip=None, size=(None, None), s=(None, None), auto_size_button=None, button_color=None,
               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

13562
13563# ------------------------- FILE BROWSE Element lazy function ------------------------- #
13564def FileSaveAs(button_text='Save As...', target=(ThisRow, -1), file_types=FILE_TYPES_ALL_FILES, initial_folder=None,
13565 default_extension='', disabled=False, tooltip=None, size=(None, None), s=(None, None), auto_size_button=None, button_color=None,
13566 change_submits=False, enable_events=False, font=None,
13567 pad=None, p=None, key=None, k=None, visible=True, metadata=None, expand_x=False, expand_y=False):
13568 """
13569
13570 :param button_text: text in the button (Default value = 'Save As...')
13571 :type button_text: (str)
13572 :param target: key or (row,col) target for the button (Default value = (ThisRow, -1))
13573 :type target: str | (int, int)
13574 :param file_types: Default value = (("ALL Files", "*.* *"),).
13575 :type file_types: Tuple[(str, str), ...]
13576 :param default_extension: If no extension entered by user, add this to filename (only used in saveas dialogs)
13577 :type default_extension: (str)
13578 :param initial_folder: starting path for folders and files
13579 :type initial_folder: (str)
13580 :param disabled: set disable state for element (Default = False)
13581 :type disabled: (bool)
13582 :param tooltip: text, that will appear when mouse hovers over the element
13583 :type tooltip: (str)
13584 :param size: (w,h) w=characters-wide, h=rows-high
13585 :type size: (int, int)
13586 :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
13587 :type s: (int, int) | (None, None) | int
13588 :param auto_size_button: True if button size is determined by button text
13589 :type auto_size_button: (bool)
13590 :param button_color: button color (foreground, background)
13591 :type button_color: (str, str) | str
13592 :param change_submits: If True, pressing Enter key submits window (Default = False)
13593 :type change_submits: (bool)
13594 :param enable_events: Turns on the element specific events.(Default = False)
13595 :type enable_events: (bool)
13596 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
13597 :type font: (str or (str, int[, str]) or None)
13598 :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)
13599 :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
13600 :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
13601 :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
13602 :param key: key for uniquely identify this element (for window.find_element)
13603 :type key: str | int | tuple | object
13604 :param k: Same as the Key. You can use either k or key. Which ever is set will be used.
13605 :type k: str | int | tuple | object
13606 :param visible: set initial visibility state of the Button
13607 :type visible: (bool)
13608 :param metadata: Anything you want to store along with this button
13609 :type metadata: (Any)
13610 :param expand_x: If True Element will expand in the Horizontal directions
13611 :type expand_x: (bool)
13612 :param expand_y: If True Element will expand in the Vertical directions
13613 :type expand_y: (bool) :return: returns a button
13614 :rtype: (Button)
13615 """
13616 return Button(button_text=button_text, button_type=BUTTON_TYPE_SAVEAS_FILE, target=target, file_types=file_types,
13617 initial_folder=initial_folder, default_extension=default_extension, tooltip=tooltip, size=size, s=s, disabled=disabled,
13618 auto_size_button=auto_size_button, button_color=button_color, change_submits=change_submits,
13619 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)
13620
13621

Callers

nothing calls this directly

Calls 1

ButtonClass · 0.85

Tested by

no test coverage detected