On Thu, Sep 25, 2008 at 05:48:54PM +0200, Alessandro Dentella wrote: > Hi, > > I want to color single cells in a TreeView (totals of a table). > Since I'm using cell_data_func to set value of property text I tried > using that same function to set colors but it turns out all cells get > colored... > > def dict_cell_data_func(self, column, cell, model, iter, (col_num, name)): > obj = model.get_value(iter, col_num) > value = getattr(obj, name) > cell.set_property("text", value) > if value == 'venice': > cell.set_property("cell-background", 'yellow') >
more on this. If I add to this callback a line that prints the id of the cell: print id(cell) I see that the cell is the same for any row. I though it was an instance for each row. I'm even more puzzled. If it's one single cell for the whole column, how can it have "text" property different on each row? (and why it's able to differentiate "text" property but not "cell-background"?) sandro *:-) _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/