[plt-scheme] mouse event
(define my-canvas%
(class canvas%
(define/override (on-event evt)
(when (send evt button-down?)
(printf "click at (~a, ~a)\n"
(send evt get-x)
(send evt get-y))))
(super-instantiate ())))
(define f (instantiate frame% ()
(label "frame")
(width 100)
(height 100)))
(define c (instantiate my-canvas% ()
(parent f)))
(send f show #t)
At Mon, 5 May 2003 23:20:50 +0200, "Ziighou" wrote:
> ------------------------------------------------------------------------------
> Can you give me some examples of mouse event in a canvas (return pos x
> and y when you click the canvas).
> Thank you.
>
> ------------------------------------------------------------------------------
>
> Can you give me some examples of mouse event in a canvas (return pos x and y when you click the canvas).
>
> Thank you.
>