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

Function set_options

PySimpleGUI/PySimpleGUI.py:18756–19199  ·  view source on GitHub ↗

:param icon: Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO. Most portable is to use a Base64 of a PNG file. This works universally across all OS's :type icon: bytes

(icon=None, button_color=None, element_size=(None, None), button_element_size=(None, None),
                margins=(None, None),
                element_padding=(None, None), auto_size_text=None, auto_size_buttons=None, font=None, border_width=None,
                slider_border_width=None, slider_relief=None, slider_orientation=None,
                autoclose_time=None, message_box_line_width=None,
                progress_meter_border_depth=None, progress_meter_style=None,
                progress_meter_relief=None, progress_meter_color=None, progress_meter_size=None,
                text_justification=None, background_color=None, element_background_color=None,
                text_element_background_color=None, input_elements_background_color=None, input_text_color=None,
                scrollbar_color=None, text_color=None, element_text_color=None, debug_win_size=(None, None),
                window_location=(None, None), error_button_color=(None, None), tooltip_time=None, tooltip_font=None, use_ttk_buttons=None, ttk_theme=None,
                suppress_error_popups=None, suppress_raise_key_errors=None, suppress_key_guessing=None,warn_button_key_duplicates=False, enable_treeview_869_patch=None,
                enable_mac_notitlebar_patch=None, use_custom_titlebar=None, titlebar_background_color=None, titlebar_text_color=None, titlebar_font=None,
                titlebar_icon=None, user_settings_path=None, pysimplegui_settings_path=None, pysimplegui_settings_filename=None, keep_on_top=None, dpi_awareness=None, scaling=None, disable_modal_windows=None, force_modal_windows=None, tooltip_offset=(None, None),
                sbar_trough_color=None, sbar_background_color=None, sbar_arrow_color=None, sbar_width=None, sbar_arrow_width=None, sbar_frame_color=None, sbar_relief=None, alpha_channel=None,
                hide_window_when_creating=None, use_button_shortcuts=None, watermark_text=None, win_app_id=None)

Source from the content-addressed store, hash-verified

18754# Sets the icon to be used by default #
18755# ===================================================#
18756def set_options(icon=None, button_color=None, element_size=(None, None), button_element_size=(None, None),
18757 margins=(None, None),
18758 element_padding=(None, None), auto_size_text=None, auto_size_buttons=None, font=None, border_width=None,
18759 slider_border_width=None, slider_relief=None, slider_orientation=None,
18760 autoclose_time=None, message_box_line_width=None,
18761 progress_meter_border_depth=None, progress_meter_style=None,
18762 progress_meter_relief=None, progress_meter_color=None, progress_meter_size=None,
18763 text_justification=None, background_color=None, element_background_color=None,
18764 text_element_background_color=None, input_elements_background_color=None, input_text_color=None,
18765 scrollbar_color=None, text_color=None, element_text_color=None, debug_win_size=(None, None),
18766 window_location=(None, None), error_button_color=(None, None), tooltip_time=None, tooltip_font=None, use_ttk_buttons=None, ttk_theme=None,
18767 suppress_error_popups=None, suppress_raise_key_errors=None, suppress_key_guessing=None,warn_button_key_duplicates=False, enable_treeview_869_patch=None,
18768 enable_mac_notitlebar_patch=None, use_custom_titlebar=None, titlebar_background_color=None, titlebar_text_color=None, titlebar_font=None,
18769 titlebar_icon=None, user_settings_path=None, pysimplegui_settings_path=None, pysimplegui_settings_filename=None, keep_on_top=None, dpi_awareness=None, scaling=None, disable_modal_windows=None, force_modal_windows=None, tooltip_offset=(None, None),
18770 sbar_trough_color=None, sbar_background_color=None, sbar_arrow_color=None, sbar_width=None, sbar_arrow_width=None, sbar_frame_color=None, sbar_relief=None, alpha_channel=None,
18771 hide_window_when_creating=None, use_button_shortcuts=None, watermark_text=None, win_app_id=None):
18772 """
18773 :param icon: Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO. Most portable is to use a Base64 of a PNG file. This works universally across all OS's
18774 :type icon: bytes | str
18775 :param button_color: Color of the button (text, background)
18776 :type button_color: (str, str) | str
18777 :param element_size: element size (width, height) in characters
18778 :type element_size: (int, int)
18779 :param button_element_size: Size of button
18780 :type button_element_size: (int, int)
18781 :param margins: (left/right, top/bottom) tkinter margins around outsize. Amount of pixels to leave inside the window's frame around the edges before your elements are shown.
18782 :type margins: (int, int)
18783 :param element_padding: Default amount of padding to put around elements in window (left/right, top/bottom) or ((left, right), (top, bottom))
18784 :type element_padding: (int, int) or ((int, int),(int,int))
18785 :param auto_size_text: True if the Widget should be shrunk to exactly fit the number of chars to show
18786 :type auto_size_text: bool
18787 :param auto_size_buttons: True if Buttons in this Window should be sized to exactly fit the text on this.
18788 :type auto_size_buttons: (bool)
18789 :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
18790 :type font: (str or (str, int[, str]) or None)
18791 :param border_width: width of border around element
18792 :type border_width: (int)
18793 :param slider_border_width: Width of the border around sliders
18794 :type slider_border_width: (int)
18795 :param slider_relief: Type of relief to use for sliders
18796 :type slider_relief: (str)
18797 :param slider_orientation: ???
18798 :type slider_orientation: ???
18799 :param autoclose_time: ???
18800 :type autoclose_time: ???
18801 :param message_box_line_width: ???
18802 :type message_box_line_width: ???
18803 :param progress_meter_border_depth: ???
18804 :type progress_meter_border_depth: ???
18805 :param progress_meter_style: You can no longer set a progress bar style. All ttk styles must be the same for the window
18806 :type progress_meter_style: ???
18807 :param progress_meter_relief:
18808 :type progress_meter_relief: ???
18809 :param progress_meter_color: ???
18810 :type progress_meter_color: ???
18811 :param progress_meter_size: ???
18812 :type progress_meter_size: ???
18813 :param text_justification: Default text justification for all Text Elements in window

Callers 15

theme_background_colorFunction · 0.85
theme_text_colorFunction · 0.85
theme_input_text_colorFunction · 0.85
theme_button_colorFunction · 0.85
theme_progress_bar_colorFunction · 0.85
theme_slider_colorFunction · 0.85
theme_border_widthFunction · 0.85

Calls 2

UserSettingsClass · 0.85
running_windowsFunction · 0.70

Tested by

no test coverage detected