# How to reduce spacing between vertical sliders?

Consider the following code:

Row[
Table[
With[{i = i},
x = ConstantArray[0.5, 3];
Column[{i,
VerticalSlider[Dynamic@x[[i]], Appearance -> "Labeled",
ImageSize -> Small]}, Alignment -> Center]
],
{i, 1, 3, 1}
]
]


It creates 3 vertical sliders which are widely spaced apart. How can I reduce the spacing between them?

One more thing, I wish to interchange the positions of the slider indices and their values.

try this

Row[Table[With[{i = i}, x = ConstantArray[0.5, 3];
Column[{i,
VerticalSlider[x[[i]], Appearance -> "Labeled", ImageSize -> 30],
"      "}, Alignment -> Center]], {i, 1, 3, 1}]]


you can manipulate spacing by adding spaces at " "

here are slider indices and their values placed at the bottom

Row[Table[With[{i = i}, x = ConstantArray[0.5, 3];
Column[{VerticalSlider[Dynamic@x[[i]], Appearance -> "Labeled",
ImageSize -> 30], "      ", i}, Alignment -> Center]], {i, 1, 3,
1}]]

• Thanks for your answer. One observation: if you try to reduce the height, it creates a big gap between the sliders and their corresponding values. – Majis May 25 '17 at 9:58
• I made one more change and it looks better. You can now separate them as much as you want – J42161217 May 25 '17 at 10:00
• just add spaces at " " – J42161217 May 25 '17 at 10:01
• Or use the function Spacer – Bob Hanlon May 25 '17 at 19:08

This also works:

Row[
Table[With[{i = i}, x = ConstantArray[0.5, 3];
Column[{i,
VerticalSlider[Dynamic@x[[i]],
Appearance -> "Labeled",
ImageSize -> 30]},
Alignment -> Center]
],
{i, 1, 3, 1}],
Spacer[10] (* Row second parameter is a separator between successive elements *)
]

• I see that you edit my code and not OP's... – J42161217 May 25 '17 at 15:12
• 30 is a good size. I agree. – Gustavo Delfino May 25 '17 at 15:20
• Yes, changing "Small" to "30" was the key! Spacer wouldn't work otherwise. – J42161217 May 25 '17 at 16:07