Re: Using foreach loop to create radiobutton menu



I appreciate the significance of your answer, however, my problem
persists. Here is the updated code...

menubutton range -text "Set Range" -underline 0 -bd 0 -menu {
foreach range {1 2 3 4 5 6 7 8 9 10} "
radiobutton range$range -label $range -command {puts hello}
"
}

When this code executes, I get this error:

"...... - can't read "range": no such variable"

.