[pygtk] TreeView highlighting

Alessandro Dentella sandro at e-den.it
Wed Nov 19 20:08:59 WST 2008


On Wed, Nov 19, 2008 at 01:44:11AM -0800, Jim Trebbien wrote:
> Hi
> I am working on a project in which I use treeviews, what I can't figure out is
> how do I highlight a single cell in a treeview and/or getting it to not be
> highlighted at all?
> If anyone have an example or a link... well anything, it would be a great help.

http://faq.pygtk.org/index.py?req=show&file=faq13.031.htp


I use it as follows:

    def cell_default_cb(self, column, cell, model, iter, prop_name, field_name):
        """function set by set_cell_data_func
        gets the attribute from the record and returns it
        """

	if ....:
            cell.set_property('cell-background', your_color)        
        else:
            cell.set_property('cell-background-set', False)


sandro
*:-)

--
Sandro Dentella  *:-)
http://sqlkit.argolinux.org        SQLkit home page - PyGTK/python/sqlalchemy


More information about the pygtk mailing list