Re: Unable to get CellRenderer working correctly



On Thu, Jan 10, 2013 at 05:33:14PM +0200, Neil Muller wrote:
> 
> You're not adding your CellRenderer to the column (something the
> TreeViewColumn helpfully does automatically). You need something like
> 
> column = Gtk.TreeViewColumn("Value")
> renderer = Gtk.CellRendererText()
> column.pack_start(renderer, True)
> column.set_cell_data_func(renderer, cell_data_func)
> 
> and so forth

Ok, that works much better...

... and it's actually written in the Python Gtk+ tutorial
("If renderer is omitted, you have to call pack_start() or pack_end()
yourself."). Juggling between the C Gtk+ doc and the Python one is
confusing sometimes.

Thanks a lot for your help anyway!

 Jon


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]