MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / _add_expansion

Function _add_expansion

PySimpleGUI/PySimpleGUI.py:15733–15749  ·  view source on GitHub ↗
(element, row_should_expand, row_fill_direction)

Source from the content-addressed store, hash-verified

15731 _add_grab(element)
15732
15733 def _add_expansion(element, row_should_expand, row_fill_direction):
15734 expand = True
15735 if element.expand_x and element.expand_y:
15736 fill = tk.BOTH
15737 row_fill_direction = tk.BOTH
15738 row_should_expand = True
15739 elif element.expand_x:
15740 fill = tk.X
15741 row_fill_direction = tk.X if row_fill_direction == tk.NONE else tk.BOTH if row_fill_direction == tk.Y else tk.X
15742 elif element.expand_y:
15743 fill = tk.Y
15744 row_fill_direction = tk.Y if row_fill_direction == tk.NONE else tk.BOTH if row_fill_direction == tk.X else tk.Y
15745 row_should_expand = True
15746 else:
15747 fill = tk.NONE
15748 expand = False
15749 return expand, fill, row_should_expand, row_fill_direction
15750
15751 # --------------------------------------------------------------------------- #
15752 # **************** Use FlexForm to build the tkinter window ********** ----- #

Callers 1

PackFormIntoFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected