I have a Manipulate
with 6 sliders controlling 6 different variables. I have labelled them all. The problem is that the labels have different lengths, so it looks a bit messy:
I'd much rather have the sliders aligned with each other perfectly so that they don't start and end in different places, to make them look more orderly. How would it be possible to do this?
This is how the control panel is presently built:
{{x, 1, "Time"}, 1, 200*3.154`*^7, Animator,
AnimationRate -> speed*86400, AnimationRunning -> False},
Row[{Control[{{speed, 1, "Speed"}, 1, 30}], Spacer[20],
Dynamic[speed]}],
Row[{Control[{{\[Theta], 10, "Zoom"}, 30, 1}], Spacer[20],
Dynamic[\[Theta]], " degrees"}],
Row[{Control[{{scale, 0, "Scaling"}, 0, 5}], Spacer[20],
Dynamic[10^scale], " \[Times]"}],
Row[{Control[{{Opac, 0.05, "Opacity"}, 0, 0.5}], Spacer[20],
Dynamic[Opac]}],
Row[{Control[{{recurRate, 1, "Recurrence rate"}, 0.1, 1}], Spacer[20],
Dynamic[recurRate]}]
UPDATE
On @Kuba's recommendation, I have put the whole thing in a Grid
. Now however, it is displaying the variable names alongside the sliders. How can I hide the variable names from displaying next to the sliders?
This is the code I'm currently using:
Grid[{
{"Time",
Control[{{x, 1}, 1, 200*3.154`*^7, Animator,
AnimationRate -> speed*86400, AnimationRunning -> False}],
SpanFromLeft},
{"Speed", Control[{{speed, 1}, 1, 30}], Spacer[20], Dynamic[speed],
Dynamic@If[speed == 1, " day per second",
" days per second"]},
{"Zoom", Control[{{\[Theta], 10}, 30, 1}],
Spacer[20], Dynamic[\[Theta]],
Dynamic@If[\[Theta] == 1, " degree", " degrees"]},
{"Scaling", Control[{{scale, 0}, 0, 5}], Spacer[20],
Dynamic[10^scale], " \[Times]"}},
Alignment -> Left]
Grid[{ {label, control, value}, ...
instead of multiple rows. $\endgroup${{speed, 1, **"Speed"**}, 1, 30}
$\endgroup$Grid
. Anyway, you can force this with yourRows
bypn = Pane[#, 170] &;
and thenpn@"Speed"
etc. $\endgroup$Grid
to align all the controls with each other. Now I am having the variable name display alongside the label though.. as in in the first column are all the labels I put in by hand, but in the second column along with the slider is the name of the variable. How can I hide the variable name? (I have no idea how to upload images in comments so can't show you a screenshot) $\endgroup$Control[{{speed, 1}, 1, 30}]
becomesControl[{{speed, 1, ""}, 1, 30}]
. Then no variable name will show up on the left of the slider. $\endgroup$