3 source "boilerplate.tcl"
6 puts stderr
"onselect: $key"
9 entry .cg1_manual
-textvariable ::cg1
10 Checkgroup .cg1
-text "Group 1" -textvariable ::cg1 -mode "array" \
11 -choices {Foo foo Bar bar Baz
"hello world"}
13 entry .cg2_manual
-textvariable ::cg2
14 Checkgroup .cg2
-text "Pick Any Two" -textvariable ::cg2 -mode "picklist" \
15 -choices {Cheap cheap Fast fast Reliable reliable
} -orient h
17 Gate
#auto picktwo(cheap_fast) -mode and
18 Gate
#auto picktwo(cheap_reliable) -mode and
19 Gate
#auto picktwo(fast_reliable) -mode and
21 $picktwo(cheap_fast
) attach_input
[.cg2 signal_ref option_cheap
]
22 $picktwo(cheap_fast
) attach_input
[.cg2 signal_ref option_fast
]
24 $picktwo(cheap_reliable
) attach_input
[.cg2 signal_ref option_cheap
]
25 $picktwo(cheap_reliable
) attach_input
[.cg2 signal_ref option_reliable
]
27 $picktwo(fast_reliable
) attach_input
[.cg2 signal_ref option_fast
]
28 $picktwo(fast_reliable
) attach_input
[.cg2 signal_ref option_reliable
]
30 .cg2 attach_signal cheap
$picktwo(fast_reliable
) inverted
31 .cg2 attach_signal fast
$picktwo(cheap_reliable
) inverted
32 .cg2 attach_signal reliable
$picktwo(cheap_fast
) inverted
34 .cg1 register_handler onselect onselect
38 bar
"Choose a bar instead"
42 "Bar" {foo checkgroup
-choices {"Option 1" 1 "Option 2" 2}}
45 table .
-padx 5 -pady 5 \
46 .cg1_manual
1,1 -fill x
\
48 .cg2_manual
3,1 -fill x
\
52 [Signal_monitor .cg1_monitor
-signal_source .cg1
] show
53 [Signal_monitor .cg2_monitor
-signal_source .cg2
] show