# Control placement in manipulate environments

Is it possible to have sliders and such appear centered on the top or bottom of the panel? The ControlPlacement options only include Top, Bottom, Left, and Right, but the Top placement gives me left-aligned controls, while I want them centered. How do I achieve this?

• You can put there whatever you want, is that enough?: Overlaying a Plot within a Manipulate Control Panel. – Kuba Sep 8 '16 at 18:58
• No, unless I misunderstand, it's the slider itself the placement of which I want more control over. From the answer below it looks like there's no simple way to achieve this, other than kludges... :-/ – Pirx Sep 8 '16 at 20:19

The Control Image Size control is provided just to demonstrate the approximate automatic centering of the n control at varying image sizes

Manipulate[
Style[N[Pi, n], Small],
Column[{
Control[{{cis, 300, "Control Image Size"}, 100, 500, 50,
Appearance -> "Labeled"}]},
ItemSize -> 75,
Alignment -> Center],
Column[{
Control[{{n, 100}, 10^2, 10^4, 10^2,
Appearance -> "Labeled",
ImageSize -> cis}]},
ItemSize -> 75,
Alignment -> Center],
AppearanceElements -> None,
ContentSize -> 600]


• Ah, that helps, thanks! – Pirx Sep 9 '16 at 0:51
• I don't really get it... When you change ItemSize->75 to any other value, e.g. 50, it's not centered anymore. So how is this different from finding a value for Spacer in my answer? – corey979 Sep 9 '16 at 8:28
• @corey979 - I see the difference as the ability to change the ImageSize for the control for n without changing its column's ItemSize – Bob Hanlon Sep 9 '16 at 11:17

This is a way for a workaround:

Manipulate[
Style[N[Pi, n], Small], {{n, 100, Row[{Spacer[175], "n"}]}, 100,
10000, 100, Appearance -> "Labeled", ImageSize -> Automatic},
AppearanceElements -> None, ContentSize -> 600]


Unfortunately you have to set the argument of Spacer[175] by trial and error; also playing with ContentSize -> 600 and ImageSize -> Automatic might be required for the window to have nice proportions.

• Hmm, too bad. I guess I'll have to rethink the design I have in mind... – Pirx Sep 8 '16 at 20:21