A couple more ways.
PaneSelector
, with a blank Row
:
Manipulate[{x, y},
PaneSelector[{True -> Control[{x, 0, 1}], False -> Row[{}]},
Dynamic[visible != "only y-slider visible"]],
PaneSelector[{True -> Control[{y, 0, 1}], False -> Row[{}]},
Dynamic[visible != "only x-slider visible"]],
{visible, {"only x-slider visible", "only y-slider visible",
"both visible"}, ControlType -> PopupMenu}]
Dynamic
switch between Identity
& Invisible
:
Manipulate[{x, y},
Dynamic[If[visible != "only y-slider visible", Identity, Invisible]@
Control[{x, 0, 1}]],
Dynamic[If[visible != "only x-slider visible", Identity, Invisible]@
Control[{y, 0, 1}]],
{visible, {"only x-slider visible", "only y-slider visible",
"both visible"}, ControlType -> PopupMenu}]
