Column element - allow width or heigt to be None so only 1 is set

This commit is contained in:
MikeTheWatchGuy 2018-12-30 12:48:32 -05:00
parent 27dc30977a
commit cfeb572c9d
1 changed files with 4 additions and 2 deletions

View File

@ -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)