in my code below, I have 2 variables a and b, and a option whether it is on or off state. I would like to disable slider for variable b (and therefore it would take default value = 0 in that case) when myOptions = "Off". In other words, I don't want the user to be able to change the value of b when myOptions is set to "Off". And also I would like the slider for variable "b" disappear too. How can I do that ?
Manipulate[
a x + b, {a, -1, 1}, {{b, 0}, -1, 1}, {myOptions, {"On", "Off"}}
]