MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / add_rows

Method add_rows

PySimpleGUI/PySimpleGUI.py:10287–10307  ·  view source on GitHub ↗

Loops through a list of lists of elements and adds each row, list, to the layout. This is NOT the best way to go about creating a window. Sending the entire layout at one time and passing it as a parameter to the Window call is better. :param rows: A list of a list

(self, rows)

Source from the content-addressed store, hash-verified

10285
10286 # ------------------------- Add Multiple Rows to Form ------------------------- #
10287 def add_rows(self, rows):
10288 """
10289 Loops through a list of lists of elements and adds each row, list, to the layout.
10290 This is NOT the best way to go about creating a window. Sending the entire layout at one time and passing
10291 it as a parameter to the Window call is better.
10292
10293 :param rows: A list of a list of elements
10294 :type rows: List[List[Elements]]
10295 """
10296 for row in rows:
10297 try:
10298 iter(row)
10299 except TypeError:
10300 _error_popup_with_traceback('Error Creating Window Layout', 'Error creating Window layout',
10301 'Your row is not an iterable (e.g. a list)',
10302 'Instead of a list, the type found was {}'.format(type(row)),
10303 'The offensive row = ',
10304 row,
10305 'This item will be stripped from your layout')
10306 continue
10307 self.add_row(*row)
10308
10309
10310 def layout(self, rows):

Callers 1

layoutMethod · 0.95

Calls 2

add_rowMethod · 0.95

Tested by

no test coverage detected