Tim Evans: But it doesn't work for me! The "button" receives neither
"button-press-event" or "pressed" or "clicked". I receives only an
expose-event when resizing column.
def show_event(widget, event):
print type(widget), event.type.value_name
button.connect('event', show_event)
On 6/18/09, Tim
Alessandro Dentella wrote:
> Hi,
>
> I'd like to connect to a 'button-press-event' of a column header of a
> TreeViewColumn. As only clicked is provided, I set the widget::
>
> label = gtk.Label(title)
> box = gtk.EventBox()
> box.add(label)
> column.set_widget
I've just tried a few ways... got nothing better than catching button
press on the whole area of TreeView. Seems that widgets in column
headers are not activatable, same as, for example, widgets packed into
MenuItem
2009/6/17, Alessandro Dentella :
> Hi,
>
> I'd like to connect to a 'button-pres
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.__
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('butt
I even tried to use a custom calss:
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 dosen't detect 'button-p
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-p
On Wed, Jun 17, 2009 at 02:08:00PM +0400, ilya korcdmk wrote:
> Maybe you need to add event to catch button press with
>
> col.add_events(gtk.gdk.BUTTON_PRESS_MASK)
thanks for the hint but it doesn't work
column.add_events(gtk.gdk.BUTTON_PRESS_MASK)
AttributeError: 'gtk.TreeViewColumn' object
Maybe you need to add event to catch button press with
col.add_events(gtk.gdk.BUTTON_PRESS_MASK)
2009/6/17, Alessandro Dentella :
> On Wed, Jun 17, 2009 at 11:22:45AM +0200, Roberto Cavada wrote:
>> Alessandro Dentella wrote:
>>
>> > but box_clicked_cb is never called. Why that?
>>
>>
>> Use
On Wed, Jun 17, 2009 at 11:22:45AM +0200, Roberto Cavada wrote:
> Alessandro Dentella wrote:
>
> > but box_clicked_cb is never called. Why that?
>
>
> Use 'clicked' signal, after enabling it:
>
> col = gtk.TreeViewColumn(...)
> col.set_clickable(True)
> col.connect("clicked", self.on_col_clic
Alessandro Dentella wrote:
> but box_clicked_cb is never called. Why that?
Use 'clicked' signal, after enabling it:
col = gtk.TreeViewColumn(...)
col.set_clickable(True)
col.connect("clicked", self.on_col_clicked)
r.
___
pygtk mailing list pygtk
Hi,
I'd like to connect to a 'button-press-event' of a column header of a
TreeViewColumn. As only clicked is provided, I set the widget::
label = gtk.Label(title)
box = gtk.EventBox()
box.add(label)
column.set_widget(box)
box.connect('button-press-event
12 matches
Mail list logo