MCPcopy Index your code
hub / github.com/python/cpython / grid_content

Method grid_content

Lib/tkinter/__init__.py:2056–2075  ·  view source on GitHub ↗

Returns a list of the content widgets. If no arguments are supplied, a list of all of the content in this container widget is returned, most recently managed first. If ROW or COLUMN is specified, only the content in the row or column is returned.

(self, row=None, column=None)

Source from the content-addressed store, hash-verified

2054 size = grid_size
2055
2056 def grid_content(self, row=None, column=None):
2057 """Returns a list of the content widgets.
2058
2059 If no arguments are supplied, a list of all of the content in this
2060 container widget is returned, most recently managed first.
2061 If ROW or COLUMN is specified, only the content in the row or
2062 column is returned.
2063 """
2064 args = ()
2065 if row is not None:
2066 args = args + ('-row', row)
2067 if column is not None:
2068 args = args + ('-column', column)
2069 try:
2070 res = self.tk.call('grid', 'content', self._w, *args)
2071 except TclError:
2072 if self.info_patchlevel() >= (8, 6):
2073 raise
2074 res = self.tk.call('grid', 'slaves', self._w, *args)
2075 return [self._nametowidget(x) for x in self.tk.splitlist(res)]
2076
2077 def grid_slaves(self, row=None, column=None):
2078 """Synonym for grid_content()."""

Callers 3

test_grid_forgetMethod · 0.80
test_grid_removeMethod · 0.80
test_grid_contentMethod · 0.80

Calls 3

info_patchlevelMethod · 0.95
splitlistMethod · 0.80
callMethod · 0.45

Tested by 3

test_grid_forgetMethod · 0.64
test_grid_removeMethod · 0.64
test_grid_contentMethod · 0.64