MCPcopy Create free account
hub / github.com/ActiveState/code / column

Method column

recipes/Python/580786_Tkinter_table/recipe-580786.py:181–199  ·  view source on GitHub ↗
(self, index, data=None)

Source from the content-addressed store, hash-verified

179 if self._on_change_data is not None: self._on_change_data()
180
181 def column(self, index, data=None):
182 number_of_rows = self._number_of_rows
183
184 if data is None:
185 column= []
186
187 for i in range(number_of_rows):
188 column.append(self._data_vars[i][index].get())
189
190 return column
191 else:
192
193 if len(data) != number_of_rows:
194 raise ValueError("data has no %d elements: %s"%(number_of_rows, data))
195
196 for i in range(self._number_of_columns):
197 self._data_vars[i][index].set(data[i])
198
199 if self._on_change_data is not None: self._on_change_data()
200
201 def clear(self):
202 number_of_rows = self._number_of_rows

Callers 8

configure_treeMethod · 0.45
configure_treeMethod · 0.45
configure_treeMethod · 0.45
__init__Method · 0.45
__init__Method · 0.45
configure_treeMethod · 0.45
__init__Method · 0.45
configure_columnMethod · 0.45

Calls 4

rangeFunction · 0.85
appendMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected