On 18-08-10 12:01, Greg Bair wrote:
Hi all,
When setting an attribute for a CellRendererPixbuf like so:
column.add_attribute(render_pixbuf, 'stock-size', gtk.ICON_SIZE_BUTTON)
I got the following error:
Warning: unable to set property `stock-size' of type `guint' from value
of type `gchararray'
The GTK+ C ref says that these are the correct constants to use. What
am I doing wrong?
Have you looked at the PyGTK reference manual?
http://www.pygtk.org/docs/pygtk/class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--add-attribute
It would be something like:
column.add_attribute(render_pixbuf, 'pixbuf', 0) # Last value is the
number of the column
Cheers,
Timo
BTW, the stock icon is gtk.STOCK_APPLY, if that helps
any.
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/