Re: Unable to get CellRenderer working correctly
- From: Jonathan Ballet <jon multani info>
- To: Neil Muller <drnlmuller+gtk gmail com>
- Cc: python-hackers-list gnome org
- Subject: Re: Unable to get CellRenderer working correctly
- Date: Fri, 11 Jan 2013 01:06:11 +0800
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]