Class AutoTreeviewSetCell
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)
| Method Summary |
| |
__init__(self,
cellType,
cellIndex)
Constructor |
| |
__call__(self,
column,
cell,
treeModel,
iter)
|
__init__(self,
cellType,
cellIndex)
(Constructor)
Constructor
-
- Parameters:
cellType -
the cell type (i.e.: text, pixbuf)
(type=str)
cellIndex -
the cell (column) index inside the Treeview
(type=int)
|