On Thu, 2010-08-19 at 08:56 +1200, Tim Evans wrote: > On 2010-08-18 22: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? BTW, the stock icon is gtk.STOCK_APPLY, if that helps > > any. > > The column.add_attribute method is for adding values that vary down the > column, by pulling each value from a column of the list model. If you > just want to set a constant value for a cell renderer property, use > something like this: > > render_pixbuf.props.stock_size = gtk.ICON_SIZE_BUTTON >
Thanks, I didn't quite put together that the add_attribute was used that way. Thanks for the help. _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
