[pygtk] Receiving click events on a CellRendererPixbuf
Petr Kubánek
petr at kubanek.net
Sun May 15 21:56:22 WST 2011
Hi,
I solved some time ago the problem by hooking to on_activate. That
worked for GenericCellRender, not sure if that will work for Pixmap. The
code is on:
https://rts-2.svn.sourceforge.net/svnroot/rts-2/trunk/pyrts2/windowscheduler.py
look for on_activate event. There is also description in the code how to
render things in GenericCellRenderer.
Hope this helps.
Petr Kubánek
http://rts2.org
Osmo Salomaa píše v Ne 15. 05. 2011 v 07:35 +0300:
> la, 2011-05-14 kello 21:17 -0600, John Haiducek kirjoitti:
> > Is there any way for a CellRendererPixbuf to receive click events?
>
> Maybe you can handle those click events at the tree view level? Take a
> look at gtk.TreeView signals 'cursor-changed' and 'row-activated'. Those
> should allow you to handle the common cases of single and double left
> click events and corresponding keyboard events. There's also
> gtk.Widget's 'button-press-event' etc., coordinates from which you can
> convert with gtk.TreeView.get_path_at_pos.
>
More information about the pygtk
mailing list