Greetings,
I am creating a popup menu which is invoked using the right mouse button
over a canvas widget.
The problem I am having is that the mouse click following the popdown of
the menu is not getting through to the canvas. The second click does,
however.
Has anyone encountered anything like this?
Here is how I create the popup:
(let ((popup-menu (make <menu>
:tear-off #f
:background *canvas-color*
:foreground "blue"
:activebackground "blue"
:activeforeground *canvas-color*
:disabledforeground "gray75"
:relief "solid"
:borderwidth 1)))
(define (add-menu-command label command)
((Id popup-menu) 'add 'command :label label :command command
:background *canvas-color*
:foreground "blue"
:activebackground "blue"
:activeforeground *canvas-color*))
(add-menu-command "Echo"
(lambda () ...)
....
And to invoke it:
(bind self "<ButtonPress-3>"
(lambda (|X| |Y|)
(Tk:popup (Id (slot-ref self 'popup-menu-id)) |X| |Y| 0)))
Thanks,
Kaveh
--
Kaveh Kardan kaveh_at_squareusa.com
Manager Software Research & Development tel: 808-535-9122
Square USA fax: 808-535-9100
"The mind is its own place, and in itself can
make a Heaven of Hell, a Hell of Heaven."
-- Paradise Lost
Received on Sat Aug 28 1999 - 02:20:59 CEST