[pygtk] Cell renderer repository?
Mitko Haralanov
mitko at qlogic.com
Thu Oct 2 09:00:05 WST 2008
On Wed, 1 Oct 2008 17:22:58 +0200
Alessandro Dentella <sandro at e-den.it> wrote:
> I'm wandering if there exist already such a renderer or a repository of
> cell renderer ready to use. A second one I need is
> Date/DateTimeRenderer. I guess I'm not the first one that need such a
> beast...
At one point, a long time ago, I did this by setting a custom data
function for a cell with (C func)
gtk_tree_view_column_set_cell_data_func.
The custom data function would get the value from the tree model,
format it as needed, and then set the "text" attribute of that cell's
renderer. The renderer itself was a text renderer.
Looking that the pygtk reference manual, this can be accomplished with
gtk.TreeView.insert_column_with_data_func()
HTH
--
Mitko Haralanov
==========================================
Computer programmers do it byte by byte.
More information about the pygtk
mailing list