From: Marius Vollmer <mvo@zagadka.ping.de>
To: "Greg J. Badros" <gjb@cs.washington.edu>
Cc: guile-gtk@sourceware.cygnus.com
Subject: Re: Right mouse click on buttons?
Date: Sun, 05 Dec 1999 05:04:00 -0000 [thread overview]
Message-ID: <874sdxhdop.fsf@zagadka.ping.de> (raw)
In-Reply-To: <qrrd7smozma.fsf@clavicle.cs.washington.edu>
"Greg J. Badros" <gjb@cs.washington.edu> writes:
> Anybody know how to make GTk+ generate a signal on a right-mouse
> click on a button (or a button-bar)?
Try the "button_press_event" signal, like so
(use-modules (gtk gtk)
(gtk gdk))
(let ((w (gtk-window-new 'toplevel))
(b (gtk-button-new-with-label "Click Me Right!")))
(gtk-container-add w b)
(gtk-signal-connect b "button_press_event"
(lambda (ev)
(cond
((= (gdk-event-button ev) 3)
(display "Yes!\n")
#t)
(else
#f))))
(gtk-widget-show-all w)
(gtk-standalone-main w))
- Marius
next prev parent reply other threads:[~1999-12-05 5:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-04 19:06 Greg J. Badros
1999-12-05 5:04 ` Marius Vollmer [this message]
1999-12-05 7:48 ` Stephen Tell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874sdxhdop.fsf@zagadka.ping.de \
--to=mvo@zagadka.ping.de \
--cc=gjb@cs.washington.edu \
--cc=guile-gtk@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).