How can I group a set of radiobuttons together?
|
|
To group radiobuttons, simply give all the buttons in a group the same
`-variable` name. Since the default variable name is `selectedButton`
for *all* radiobuttons, if no `-variable` is used, then *all* belong to
the same group.
radiobutton .left.b1 -text "Left 1" -variable leftChoice -value left1
radiobutton .left.b2 -text "Left 2" -variable leftChoice -value left2
radiobutton .left.b3 -text "Left 3" -variable leftChoice -value left3
radiobutton .right.b1 -text "Right 1" -variable rightChoice -value right1
radiobutton .right.b2 -text "Right 2" -variable rightChoice -value right2
radiobutton .right.b3 -text "Right 3" -variable rightChoice -value right3
|
|
|