canvas .c -relief raised -width 100 -height 70 pack .c -side top -fill x set coord "" entry .e -width 20 -relief sunken -bd 2 -textvariable coord pack .e bind .c <1> "ClickMouse .c %x %y" # Argomenti: # w : The canvas window # x, y : The coordinates of the mouse proc ClickMouse {w x y} { global coord set coord "$x ; $y" }

mouse_coord.tcl