Package src :: Module autoglade :: Class AutoTreeviewSetCell |
[show private | hide private]
[frames | no frames]

## 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)`

Method Details

### __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)

Generated by Epydoc 2.1 on Sun Sep 30 22:02:21 2007 | http://epydoc.sf.net