pygtk button right/middle click

Grant Edwards invalid at invalid.invalid
Wed Mar 30 13:44:10 EDT 2016


On 2016-03-30, Chris Angelico <rosuav at gmail.com> wrote:
> On Thu, Mar 31, 2016 at 2:36 AM, Grant Edwards <invalid at invalid.invalid> wrote:
>> I'm trying to figure out how to get a pygtk button respond to
>> somehting other than just a simple "left click".  With a standard
>> 3-button mouse, X11 provides at least 9 different "click" types, but
>> the pygtk button only seems to support one of them.
>
> You're looking at a couple of different, but related, things. The
> clicked() event means "the button was activated", which might have
> been caused by a mouse event, or possibly a keyboard or other
> activation.

Right.

> What you want is to react to other forms of mouse event. For that,
> you should be able to hook the generic widget handling...

So I've got to re-implement all the low-level stuff that the button
already does for the "left" button (changing appearance on
button-press and restoring it on button-release), calling the handler,
etc.  I sure seems like the batteries are missing...

-- 
Grant Edwards               grant.b.edwards        Yow! Hmmm ... A hash-singer
                                  at               and a cross-eyed guy were
                              gmail.com            SLEEPING on a deserted
                                                   island, when ...



More information about the Python-list mailing list