diff options
Diffstat (limited to 'tests/arc.tcl')
-rw-r--r-- | tests/arc.tcl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/arc.tcl b/tests/arc.tcl index d0a93ea..2887047 100644 --- a/tests/arc.tcl +++ b/tests/arc.tcl @@ -52,7 +52,7 @@ set outline black .t.c addtag arc withtag all .t.c addtag circle withtag [.t.c create oval 320 200 340 220 -fill MistyRose3] -.t.c bind arc <Any-Enter> { +.t.c bind arc <Enter> { set prevFill [lindex [.t.c itemconf current -fill] 4] set prevOutline [lindex [.t.c itemconf current -outline] 4] if {($prevFill != "") || ($prevOutline == "")} { @@ -62,9 +62,9 @@ set outline black .t.c itemconf current -outline $outline2 } } -.t.c bind arc <Any-Leave> {.t.c itemconf current -fill $prevFill -outline $prevOutline} +.t.c bind arc <Leave> {.t.c itemconf current -fill $prevFill -outline $prevOutline} -bind .t.c <1> {markarea %x %y} +bind .t.c <Button-1> {markarea %x %y} bind .t.c <B1-Motion> {strokearea %x %y} proc markarea {x y} { @@ -89,17 +89,17 @@ bind .t.c <Control-f> { puts stdout "Overlapping: [.t.c find overl $areaX1 $areaY1 $areaX2 $areaY2]" } -bind .t.c <3> {puts stdout "%x %y"} +bind .t.c <Button-3> {puts stdout "%x %y"} # The code below allows the circle to be move by shift-dragging. -bind .t.c <Shift-1> { +bind .t.c <Shift-Button-1> { set curx %x set cury %y } bind .t.c <Shift-B1-Motion> { - .t.c move circle [expr %x-$curx] [expr %y-$cury] + .t.c move circle [expr {%x-$curx}] [expr {%y-$cury}] set curx %x set cury %y } @@ -127,7 +127,7 @@ bind .t.c a { } incr i $delta c -start $i - c -extent [expr 360-2*$i] + c -extent [expr {360-2*$i}] after 20 update } |