Mouse position: Difference between revisions

Add Racket example
(Added XPL0)
(Add Racket example)
Line 518:
win.bind("<Motion>",xy)
mainloop()
</lang>
 
=={{header|Racket}}==
 
The mouse position can be queried at any time with a function in a GUI context.
 
<lang lisp>
#lang racket/gui
(define-values (point _) (get-current-mouse-state))
(send point get-x)
(send point get-y)
</lang>
 
Anonymous user