From 1bd1e9a7422267a2a8c164298416a811dca08c41 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Sat, 29 Dec 2018 20:00:49 -0500 Subject: [PATCH] Columns - continued code on specifying size --- PySimpleGUI.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 60edb177..814db4af 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -4699,13 +4699,15 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): highlightthickness=0) element.TKColFrame.config(background=element.BackgroundColor, borderwidth=0, highlightthickness=0) else: - # element.TKColFrame = tk.Frame(tk_row_frame) - 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]) - + 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]) + else: + element.TKColFrame = tk.Frame(tk_row_frame) + PackFormIntoFrame(element, element.TKColFrame, toplevel_form) element.TKColFrame.pack(side=tk.LEFT, padx=elementpad[0], pady=elementpad[1], expand=True, fill='both') if element.Visible is False: