diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 2f69a2be..18c6001f 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -2406,7 +2406,7 @@ class ErrorElement(Element): # ------------------------------------------------------------------------- # class Window: - def __init__(self, title, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size = (None, None), auto_size_text=None, auto_size_buttons=None, location=(None, None), button_color=None, font=None, progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False, auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, force_toplevel = False, return_keyboard_events=False, use_default_focus=True, text_justification=None, no_titlebar=False, grab_anywhere=False, keep_on_top=False): + def __init__(self, title, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size = (None, None), auto_size_text=None, auto_size_buttons=None, location=(None, None), button_color=None, font=None, progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False, auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, force_toplevel = False, return_keyboard_events=False, use_default_focus=True, text_justification=None, no_titlebar=False, grab_anywhere=False, keep_on_top=False, resizable=False): ''' Window :param title: @@ -2470,6 +2470,7 @@ class Window: self.GrabAnywhere = grab_anywhere self.KeepOnTop = keep_on_top self.ForceTopLevel = force_toplevel + self.Resizable = resizable # ------------------------- Add ONE Row to Form ------------------------- # def AddRow(self, *args): @@ -4015,6 +4016,9 @@ def StartupTK(my_flex_form): root.bind("", my_flex_form.StopMove) root.bind("", my_flex_form.OnMotion) + if not my_flex_form.Resizable: + root.resizable(False,False) + if my_flex_form.KeepOnTop: root.wm_attributes("-topmost", 1)