[pygtk] Problem with cellRendererPixbuf

Alexandre Abadie Alexandre.Abadie at irisa.fr
Sun Dec 2 18:29:08 WST 2007


Hi pygtk-users,

I am trying to set a treeview widget with 3 columns. In my first column, 
I put a cellRendererText, in the second a cellRendererToggle and in the 
third, a cellRendererPixbuf.
I can 'easily' manipulate the 2 first columns but I have troubles for 
displaying an image in the third one. What I want to do is to associate 
a pixbuf obtained from a gtk.Image (image.get_pixbuf()) for each row of 
the treeView.

I already tryied things like : model[path][2] = image.get_pixbuf() but I 
have the error "indice out of range". I also had a look to the tutorial  
treeviewColumn.py but it doesn't give a good answer.

Is there someone who know how to do that ?

Thanks in advance,

Alex


More information about the pygtk mailing list