I need some explainations about using simultaneously text tag binding
and whole widget bindings. See the script below :
proc gTag {w p} {
lassign [split [$w index $p] .] y x
$w tag add Mrk $y.$x $y.[expr {$x+1}]
puts "[$w index $p]"
}
pack [text .t -width 10 -height 10]
.t insert end [string repeat "012345679\n" 10]
.t tag configure toto -background green
.t tag add toto 2.4 2.8 4.4 4.8 6.4 6.8
.t tag bind toto <Control-1> {
puts "tag bind"
break
}
.t tag configure Mrk -foreground white -background blue
bind .t <1> {gTag %W @%x,%y}
According to the man pages, the text tag bindings are executed first,
and then the whole widget bindings. Executing the above script, if I
click on a green character, the two bindings fire, although a break is
pressent in the tag binding configuration.
What am I missing here ?
Thanks for your help !
Luc
The "break" and "continue" only effect other bindings on the same "bindtags"
list -- what text and canvas do is effectively introduce a new "bindtags"
list for the items on the. Thus a break on a binding on an item does not
stop the widget binding from firing.
--
+------------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald...@kng-consulting.net |
+------------------------------------------------------------------------+
I understand. Thank you Gerald ! Is their any workaround then ?
luc