repo.or.cz
/
tcl-tlc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Improved handling of case where child is killed by a signal
[tcl-tlc.git]
/
examples
/
teststatetoggle.tcl
blob
12e430f25dbc9390b0c865843cb3ddeea54a4074
1
#!/usr/bin/itkwish3.1
2
3
source
"boilerplate.tcl"
4
5
Signal
#auto flipflop
6
7
array set
toggles
{}
8
9
set
textvar
"hello"
10
entry
.e
-textvariable
textvar
11
StateToggle
#auto toggles(entry1) .e \
12
-state
{
disabled normal
} \
13
-background
{
red blue
}
14
15
$toggles
(
entry1
)
attach_signal
$flipflop
16
17
table .
\
18
.e
1
,
1
19
20
proc
doflip
{} {
21
$
::
flipflop
toggle_state
22
after
3000
doflip
23
}
24
25
doflip
26