Code:
Hello all:
Please help me to find out why my program always report
an error message after I run my code. I am tring to get label behave like a button.
my code as follow;
proc doEnter {} { .label1 configure -borderwidth 3 }
proc doLeave {} { .lable1 configure -borderwidth 1}
proc doPrease {} { .label configure -background lightblue }
proc doRelease {} {.label configure -background white }
proc doCallback {} {puts "Executing callback" }
label .label1 -text "I'm a waannabe button" -relief solid -bd 1
pack .label1
bind .label1 <Enter> doEnter
bind .label1 <ButtonPress-1> doPress
bind .label1 <ButtonRelease-1> {doRelease doCallback}
bind .label1 <Leave> doLeave
rgds
stewang