Tcl-Tk - a small tk program problem

Posted on Tue Mar 25 13:13:07 2008 by dota
a small tk program problem
#!/usr/bin/wish set aa 0 for {set i 1} {$i < 5} {incr i} { set bt [button .$i -text $i] bind $bt <Button-1> { incr aa $bt configure -text $aa update } }
when I press button .1 .2 .3 .4 , only button .4 text change. why this happen ? and how to make button text change separately?
Direct Responses: 7453 | Write a response