[pygtk] Putting a PyObject in a ListStore
David Johansson
david.lgj at gmail.com
Tue Sep 19 00:20:25 WST 2006
Hi,
you will have to set a "cell_data_func" for that column.
Take a look at the pygtk tutorial
http://pygtk.org/pygtk2tutorial/sec-CellRenderers.html#sec-CellDataFunction
/david
2006/9/16, Noah Schwartz <noah.schwartz1 at gmail.com>:
> Hi,
>
> I'd like one of the columns in my ListStore to contain a PyObject. I have
> defined the __str__ and __repr__ (both return a string) for the object I
> would like to put in the column and have created my ListStore like so:
>
> self.listStoreJobs = gtk.ListStore(gobject.TYPE_PYOBJECT, int)
>
> However, Im not sure how to setup the CellRendererText for that column. For
> the int column I have set the attribute "text" but, I cant seem to figure out
> what attribute I would need to set for the PyObject column.
>
> Thanks in advance,
> Noah
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
More information about the pygtk
mailing list