Merge pull request #490 from MikeTheWatchGuy/Dev-latest
New resizable feature for windows. Default is not resizable
This commit is contained in:
commit
22c1dbd160
|
@ -2406,7 +2406,7 @@ class ErrorElement(Element):
|
||||||
# ------------------------------------------------------------------------- #
|
# ------------------------------------------------------------------------- #
|
||||||
class Window:
|
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
|
Window
|
||||||
:param title:
|
:param title:
|
||||||
|
@ -2470,6 +2470,7 @@ class Window:
|
||||||
self.GrabAnywhere = grab_anywhere
|
self.GrabAnywhere = grab_anywhere
|
||||||
self.KeepOnTop = keep_on_top
|
self.KeepOnTop = keep_on_top
|
||||||
self.ForceTopLevel = force_toplevel
|
self.ForceTopLevel = force_toplevel
|
||||||
|
self.Resizable = resizable
|
||||||
|
|
||||||
# ------------------------- Add ONE Row to Form ------------------------- #
|
# ------------------------- Add ONE Row to Form ------------------------- #
|
||||||
def AddRow(self, *args):
|
def AddRow(self, *args):
|
||||||
|
@ -4015,6 +4016,9 @@ def StartupTK(my_flex_form):
|
||||||
root.bind("<ButtonRelease-1>", my_flex_form.StopMove)
|
root.bind("<ButtonRelease-1>", my_flex_form.StopMove)
|
||||||
root.bind("<B1-Motion>", my_flex_form.OnMotion)
|
root.bind("<B1-Motion>", my_flex_form.OnMotion)
|
||||||
|
|
||||||
|
if not my_flex_form.Resizable:
|
||||||
|
root.resizable(False,False)
|
||||||
|
|
||||||
if my_flex_form.KeepOnTop:
|
if my_flex_form.KeepOnTop:
|
||||||
root.wm_attributes("-topmost", 1)
|
root.wm_attributes("-topmost", 1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue