Re: [pygtk] Putting a PyObject in a ListStore

2006-09-18 Thread David Johansson

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 [EMAIL PROTECTED]:

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@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


___
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/


[pygtk] Putting a PyObject in a ListStore

2006-09-15 Thread Noah Schwartz
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@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/