[pygtk] how to use set_widget method of TreeViewColumn?

Doug Quale quale1 at charter.net
Mon Feb 23 06:49:04 WST 2004


Abel Daniel <abli at freemail.hu> writes:

> I tried column.set_widget(gtk.Label('foo')),
> but instead of what I expected (getting a label in the header, the
> same as passing in 'foo' when creating the TreeViewColumn), I got
> an empty, about 9 pixel wide, empty header.
> 
> What am I doing wrong? 

You need to show() the widget before you set it as the column header.

Something like

    label = gtk.Label('foo')
    label.show()
    column.set_widget(label)

should work better.


More information about the pygtk mailing list