MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / SaveAs

Function SaveAs

PySimpleGUI/PySimpleGUI.py:13623–13678  ·  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

13621
13622# ------------------------- SAVE AS Element lazy function ------------------------- #
13623def SaveAs(button_text='Save As...', target=(ThisRow, -1), file_types=FILE_TYPES_ALL_FILES, initial_folder=None, default_extension='',
13624 disabled=False, tooltip=None, size=(None, None), s=(None, None), auto_size_button=None, button_color=None,
13625 change_submits=False, enable_events=False, font=None,
13626 pad=None, p=None, key=None, k=None, visible=True, metadata=None, expand_x=False, expand_y=False):
13627 """
13628
13629 :param button_text: text in the button (Default value = 'Save As...')
13630 :type button_text: (str)
13631 :param target: key or (row,col) target for the button (Default value = (ThisRow, -1))
13632 :type target: str | (int, int)
13633 :param file_types: Default value = (("ALL Files", "*.* *"),).
13634 :type file_types: Tuple[(str, str), ...]
13635 :param default_extension: If no extension entered by user, add this to filename (only used in saveas dialogs)
13636 :type default_extension: (str)
13637 :param initial_folder: starting path for folders and files
13638 :type initial_folder: (str)
13639 :param disabled: set disable state for element (Default = False)
13640 :type disabled: (bool)
13641 :param tooltip: text, that will appear when mouse hovers over the element
13642 :type tooltip: (str)
13643 :param size: (w,h) w=characters-wide, h=rows-high
13644 :type size: (int, int)
13645 :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
13646 :type s: (int, int) | (None, None) | int
13647 :param auto_size_button: True if button size is determined by button text
13648 :type auto_size_button: (bool)
13649 :param button_color: button color (foreground, background)
13650 :type button_color: (str, str) or str
13651 :param change_submits: If True, pressing Enter key submits window (Default = False)
13652 :type change_submits: (bool)
13653 :param enable_events: Turns on the element specific events.(Default = False)
13654 :type enable_events: (bool)
13655 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
13656 :type font: (str or (str, int[, str]) or None)
13657 :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)
13658 :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int
13659 :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
13660 :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int :param key: key for uniquely identify this element (for window.find_element)
13661 :type key: str | int | tuple | object
13662 :param k: Same as the Key. You can use either k or key. Which ever is set will be used.
13663 :type k: str | int | tuple | object
13664 :param visible: set initial visibility state of the Button
13665 :type visible: (bool)
13666 :param metadata: Anything you want to store along with this button
13667 :type metadata: (Any)
13668 :param expand_x: If True Element will expand in the Horizontal directions
13669 :type expand_x: (bool)
13670 :param expand_y: If True Element will expand in the Vertical directions
13671 :type expand_y: (bool)
13672 :return: returns a button
13673 :rtype: (Button)
13674 """
13675 return Button(button_text=button_text, button_type=BUTTON_TYPE_SAVEAS_FILE, target=target, file_types=file_types,
13676 initial_folder=initial_folder, default_extension=default_extension, tooltip=tooltip, size=size, s=s, disabled=disabled,
13677 auto_size_button=auto_size_button, button_color=button_color, change_submits=change_submits,
13678 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)
13679
13680

Callers 1

popup_get_fileFunction · 0.85

Calls 1

ButtonClass · 0.85

Tested by

no test coverage detected