4
$\begingroup$

I've had trouble with this and issues similar to this in the past, where I need to track when a controlled variable is changed. Basically I have two Sliders (call them A and B) and whenever B is changed with its slider, A should be reset to some value, let's say it should be reset to 10 anytime B is changed.

In some way, shape, or form, I have never been able to come up with a reasonable solution to problems like these.

$\endgroup$

1 Answer 1

7
$\begingroup$

There are a lot of different ways to do this. My current favorite is

Manipulate[{a, b},
 {a, 1, 10}, {b, 1, 10, TrackingFunction -> (b = #; a = 10; &)}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.