Could someone please tell me what I'm doing wrong here?
I am simply trying to use a value from 2 to 10 that can be selected from radiobuttons into the variable snps. But when I run the script, select the button, and look in the output file it is simply outputs 0. Thanks!
set snps 0
foreach i {2 3 4 5 6 7 8 9 10} {
radiobutton $w.rb$i -text $i -variable snps -relief flat -value $i
pack $w.rb$i -side left
}
set out1 [open "c:/test.txt" w]
puts $out1 $snps
close $out1
pack [label $w.$snps -textvariable snps -bg white]
I am simply trying to use a value from 2 to 10 that can be selected from radiobuttons into the variable snps. But when I run the script, select the button, and look in the output file it is simply outputs 0. Thanks!
set snps 0
foreach i {2 3 4 5 6 7 8 9 10} {
radiobutton $w.rb$i -text $i -variable snps -relief flat -value $i
pack $w.rb$i -side left
}
set out1 [open "c:/test.txt" w]
puts $out1 $snps
close $out1
pack [label $w.$snps -textvariable snps -bg white]