Class AutoTreeviewSetCell
source code
AutoTreeviewSetCell helper class.
This is a helper class to set cells in gtk.Treeview. Usually, to set cell properties the
call used is as:
cell.set_property('pixbuf', treeModel.get_value(iter,
0))
But to avoid the problem of having to hardcode the cell index, 0 in
this case, this helper class is used. This is used in conjuntion with AutoGlade.__getitem__ which returns and instance of AutoTreeviewSetCell if key matches the
AUTO_TREEVIEW_SET_CELL_RE. It's used, most frequently in
initialization funtions (see AutoGlade.autoInit) like this
tvcolumn.set_cell_data_func(cellPixbuf,
self.setTreeviewPixbufCell0)
or
tvcolumn.set_cell_data_func(cellText,
self.setTreeviewTextCell1)
|
|
|
|
|
| __call__(self,
column,
cell,
treeModel,
iter,
*data) |
source code
|
|
__init__(self,
cellType,
cellIndex)
(Constructor)
| source code
|
Constructor
- Parameters:
cellType (str) - the cell type (i.e.: text, pixbuf, activatable)
cellIndex (int) - the cell (column) index inside the Treeview
|