From cfeb572c9dbc0ffdf16b7e800b2c01608d2e839f Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Sun, 30 Dec 2018 12:48:32 -0500 Subject: [PATCH] Column element - allow width or heigt to be None so only 1 is set --- PySimpleGUI.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 3f883827..3912dce8 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -4705,8 +4705,10 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): element.TKColFrame = TkFixedFrame(tk_row_frame) PackFormIntoFrame(element, element.TKColFrame.TKFrame, toplevel_form) element.TKColFrame.TKFrame.update() - if element.Size != (None, None): - element.TKColFrame.canvas.config(width=element.Size[0], height=element.Size[1]) + if element.Size[1] is not None: + element.TKColFrame.canvas.config(height=element.Size[1]) + elif element.Size[0] is not None: + element.TKColFrame.canvas.config(width=element.Size[0]) else: element.TKColFrame = tk.Frame(tk_row_frame) PackFormIntoFrame(element, element.TKColFrame, toplevel_form)