[plt-scheme] adding non-standard callbacks

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Wed Dec 20 16:01:54 EST 2006

If I wanted to add a callback to a button for when the user right-clicked,
how would I go about doing that? (note: right click does not activate the
button, only left click does, and therefore the normal "button callback"
won't work).

I figure I probably need to intercept the event before the button is able to
interpret it, and if it's not a right click, then pass the event on.  So far
I found:

(event-dispatch-handler (lambda (x) (display "that was event: ") (display

But didn't see a way to get the event out of "x".


((lambda (y) (y y)) (lambda (y) (y y)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20061220/7db19d5f/attachment.html>

Posted on the users mailing list.