[pygtk] right-click events

Alessandro Dentella sandro at e-den.it
Tue Jun 24 15:46:02 WST 2008


On Mon, Jun 23, 2008 at 08:07:24PM -0700, Adiv wrote:
> Hi, is there any way to only capture right-mouse-button clicks? All I can seem
> to find is double- and triple-clicking. I know Tkinter can capture right-button
> clicks, so I was hoping GTK could as well.

I'm not aware of any but you can just examine the events that you get as
argument to the callback:

    def button_pres_event_cb(self, wdg, ev):
        if not ev.button == 3
            your code...


sandro
*:-)


More information about the pygtk mailing list