Here's a MWE code to show two problems I'm experiencing with the sliders and their value box, under Manipulate :
Manipulate[A = Min[A, Which[f < 0, 0.5, f >= 0, 1]];
Plot[A Sin[2 Pi f t/12], {t, 0, 12},
PlotRange -> {{0, 12}, {-1, 1}},
AspectRatio -> 0.5,
Frame -> True,
Axes -> True,
ImageSize -> 800],
Row[{
Control[{{f, 1, "frequency"}, -10, 10, 0.001, Appearance -> {"Labeled", "Closed"}}],
Spacer[125],
Control[{{A, 0.1, "Amplitude"}, 0, Dynamic[If[f < 0, 0.5, 1]], 0.001, Appearance -> {"Labeled", "Closed"}}]
}],
ControlPlacement -> Bottom]
Now, if you remove the value in the first slider box, then everything goes wrong. How to prevent this to happen ?
Also, from time to time, after some box value manipulation, I may get a slider freeze : unable to slide it in any way, except by recompiling the code. Why the slider freeze ? Is there a way to prevent that to happen ?
And how can I prevent the user to enter any out of range value in the slider's box ?
If[f == Null, f = 0];
or something like that $\endgroup$AppearanceElements -> {"StepLeftButton", "PlayPauseButton", "StepRightButton", "FasterSlowerButtons", "DirectionButton"}
$\endgroup$