[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
help with a mouse events in scheme
hello, my porblem is to intercept the mouse click into a canvas
i do :
> >(define clickable-canvas%
> > (class canvas% args
> > (override
> > [on-event
> > (lambda (evt)
> > (when (send evt button-up?)
> > (printf "click at (~a,~a)~n" (send evt get-x) (send evt
> > get-y))))])
> > (sequence
> > (apply super-init args))))
> >
> >(define f (make-object frame% "frame" #f 100 100))
> >(make-object clickable-canvas% f)
> >(send f show #t)
>
the algorithm intercept the mouse click into a frame but i have to
intercept the mouse Click into a canvas.
What i have to change ? Can write me the solution ?
Thanks !