text tag binding events
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

text tag binding events

From: William J Giddings <giddings@freeuk.com>
Date: Sat Oct 29 2005 - 11:56:00 CEST

If I add a tag the content of a text widget and then add some bindings,
the mouse events are easily picked up but not the key events.
What needs to be done to the code below to ensure that the Key binding
occurs as expected.

WJG

console show

pack [text .txt] -fill both

.txt insert end "aaaaa\nbbbbb\nccccc\nddddd\eeeeee"
.txt tag add cc 3.0 "3.0 lineend"
.txt tag configure cc -background pink

.txt tag bind cc <Key> { puts KEY-EVENT }
.txt tag bind cc <Button> { puts BUTTON-EVENT }
Received on Mon Nov 21 00:36:58 2005