# Vertical RadioButtonBar in Manipulate

I want to make a vertical RadioButtonBar in Manipulate. So far I only have a workaround that looks like this:

Manipulate[
Which[
sel == 0,
Text["one"],

sel == 1,
Text["two"],

sel == 2,
Text["three"]
],
Control[{{sel, 0, ""}, {0 -> "one"}, ControlType -> RadioButton}],
Control[{{sel, 1, ""}, {1 -> "two"}, ControlType -> RadioButton}],
Control[{{sel, 2, ""}, {2 -> "three"},
ControlType -> RadioButton}],

ControlPlacement -> Left
]


Is there any way not to have a line for each of the radiobuttons? Thanks!

-
Take a look at RadioButtonBar if it helps. –  VLC Nov 21 '12 at 10:21

## 2 Answers

Manipulate[
Switch[sel,
0, Text["one"],
1, Text["two"],
2, Text["three"]], {{sel, 0, ""}, {0 -> "one", 1 -> "two",
2 -> "three"}, ControlType -> RadioButtonBar,
Appearance -> "Vertical"}, ControlPlacement -> Left]


-
Great! Thanks a lot. - I did check for the 'Appearance -> "Vertical"' option, but obviously must have done something wrong. I'm glad it's working now. –  Mockup Dungeon Nov 21 '12 at 12:11

You can try the Dynamic function as follows:

DynamicModule[{sel},
Panel[Row[{RadioButtonBar[
Dynamic[sel], {1 -> "One", 2 -> "Two", 3 -> "Three"},
Appearance -> "Vertical"],
Panel[Dynamic[
Which[sel == 1, Text["one"], sel == 2, Text["two"], sel == 3,
Text["three"]]], ImageSize -> {50, 50}]}]]]


This avoids to to have a line for each of the radiobuttons.

-
I know DynamicModule is much more flexible, but unfortunately I did not have time yet to familiarise myself with it. - But thanks a lot for the suggestion! I'll keep the code and come back to it later. –  Mockup Dungeon Nov 21 '12 at 12:13