[pygtk] treeView and pixbufs
Johan Dahlin
jdahlin at async.com.br
Thu Feb 8 22:04:11 WST 2007
marana at das.ufsc.br wrote:
> I have problems settung up a Gtk::TreeView with a column that can
> display a Pixbuf
>
> The Gtk::TreeView is OK in my application but I miss the pixbufs.
>
> Here is the class for the Gtk::TreeModelColumns:
> someone knows how to do?
Your code looks correct, but you need to insert a pixbuf in the image list
and not a gtk.Image.
So instead of:
image = gtk.Image()
image.set_from_file("D:\image3.png")
image.show()
[..]
self.tree_store.append( None, ["Regions", image, None])
Just do
pixbuf = gtk.gdk.pixbuf_new_from_file("D:\image3.png")
--
Johan Dahlin <jdahlin at async.com.br>
Async Open Source
More information about the pygtk
mailing list