[pygtk] button-press-event on a TreeViewColumn Header?
John Finlay
finlay at moeraki.com
Thu Jun 18 01:06:07 WST 2009
Alessandro Dentella wrote:
> On Wed, Jun 17, 2009 at 08:16:37PM +0430, saeed wrote:
>
>> I even tried to use a custom class:
>> class MyTreeviewColumn(gtk.TreeViewColumn, gtk.EventBox):
>> def __init__(self, *args):
>> gtk.TreeViewColumn.__init__(self, *args)
>> gtk.EventBox.__init__(self)
>> self.connect('button-press-event', self.buttonPress)
>>
>> But it doesn't detect 'button-press-event'.
>>
>> Would be the header of treeview was accessible as a separate widget,
>> or the TreeViewColums was a gtk.Widget not only a gtk.Object! :-D
>>
>> The only way that I found is that: if you don't need to resize columns,
>>
>
> no, I definitely *need* to resize columns...
>
>
> sandro
> *:-)
>
>
Could you use a MenuToolButton instead of a Button for the header using
TreeViewColumn.set_widget()?
John
More information about the pygtk
mailing list