#
# bind1.tcl - event binding lesson 1
#
lappend auto_path /tilde/welch/doc/tclbook/examples
SimpleTkApp1 listbox
.body config -bg white -width 200 -height 200 -bd 4 -relief raised
bind .body <Enter> {%W config -bg red}
bind .body <Leave> {%W config -bg white}
bind .body <ButtonPress-1> {%W config -relief sunken}
bind .body <ButtonRelease-1> {%W config -relief raised}
bind .body <Double-1> {incr double ; puts stdout $double}
bind .body <Any-Key> {puts stdout "%%A=%A %%K=%K"}
bind .body <Control-c> {exit}
set double 0
focus .body
