The variable t
needs to reset to 0 if any of the other variables tab1
, tab2
, or x
are changed. I did this by using TrackingFunction
on each Control
. What I would like to know is if there is a better, more efficient way of doing this without having to repeat TrackingFunction
for each Control
.
Manipulate[t,
{{tab1, 1, ""}, {1, 2, 3}, TrackingFunction -> (tab1 = #; t = 0; &)},
{{tab2, 1, ""}, {"A", "B"}, RadioButton, TrackingFunction -> (tab2 = #; t = 0; &)},
{{x, 0}, 0, 10, 1, TrackingFunction -> (x = #; t = 0; &)},
{{t, 0, "play"}, 0, 5, 1, Trigger}
]
Based on the answer to this post.