1 #!/usr/bin/env tclsh8.4
3 source "boilerplate.tcl"
6 puts stderr
"onselect: $key"
10 entry .rg1_manual
-textvariable ::rg1
11 Radiogroup .rg1
-text "Group 1" -textvariable ::rg1 \
12 -choices {Foo foo Bar bar Baz
"hello world"}
14 entry .rg2_manual
-textvariable ::rg2
15 Radiogroup .rg2
-text "Group 2" -textvariable ::rg2 \
16 -choices {"Option 1" 1 "Option 2" bar
} -orient h
18 entry .rg3_manual
-textvariable ::rg3
19 Radiogroup .rg3
-text "Group 3" -textvariable ::rg3 -state disabled
\
20 -choices {"Option 1" 1 "Option 2" 2} -orient h
-initial_value 2
22 .rg1 register_handler onselect onselect
26 bar
"Choose a bar instead"
30 "Bar" {foo radiogroup
-choices {"Option 1" 1 "Option 2" 2}}
31 "Baz" {sf subform
-winding h
-schema {
32 "in subform" {baz radiogroup
-choices {"A" a
"B" b
}}
36 .form set_data sf
[list baz a
]
38 table .
-padx 5 -pady 5 \
39 .rg1_manual
1,1 -anchor w
\
41 .rg2_manual
3,1 -anchor w
\
43 .rg3_manual
5,1 -anchor w
\
47 #[Signal_monitor .rg1_monitor -signal_source .rg1] show
48 #[Signal_monitor .rg2_monitor -signal_source .rg2] show
49 [Signal_monitor .rg3_monitor
-signal_source .rg3
] show