$T->tagBind(qw/demo / => [sub { my($x, $y) = (shift,shift); my($text, $sv) = @_; #my $e = $text->XEvent; #my($x, $y) = ($e->x, $e->y); my $new_line = $text->index("\@$x,$y linestart"); if ($new_line ne $last_line) { $text->tagRemove(qw/hot 1.0 end/); $last_line = $new_line; $text->tagAdd('hot', $last_line, "$last_line lineend"); } show_stat $sv, $text, $text->index('current'); }, Tcl::Ev('%x','%y'), \$STATUS_VAR] );