Improved handling of case where child is killed by a signal
[tcl-tlc.git] / examples / teststatetoggle.tcl
blob12e430f25dbc9390b0c865843cb3ddeea54a4074
1 #!/usr/bin/itkwish3.1
3 source "boilerplate.tcl"
5 Signal #auto flipflop
7 array set toggles {}
9 set textvar "hello"
10 entry .e -textvariable textvar
11 StateToggle #auto toggles(entry1) .e \
12 -state {disabled normal} \
13 -background {red blue}
15 $toggles(entry1) attach_signal $flipflop
17 table . \
18 .e 1,1
20 proc doflip {} {
21 $::flipflop toggle_state
22 after 3000 doflip
25 doflip