Message Boards Message Boards

0
|
5316 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Get Slider range to change with Manipulate variable?

Posted 5 years ago

All:

I'm working on a demonstration, and having an issue getting the slider values to cooperate. The code below isolates the issue. I'd like for the a value to reset to the new initial value when I click the button. In this code, the slider boundaries change (which is good), but the existing a value is inherited rather than resetting to the new initial value.

Appreciate any and all advice!

Manipulate[

 a,

 {{b, 1, "direction"}, {1 -> "Left to Right", 2 -> "Right to Left"}},
 PaneSelector[{
   1 -> Control[{{a, -1, "x"}, -1, 1.99999, Appearance -> "Labeled"}],
   2 -> Control[{{a, 4, "x"}, 2.00001, 4, Appearance -> "Labeled"}]
   }, Dynamic[b]],

 TrackedSymbols -> {a, b}
 ]
POSTED BY: Rob Holman
Posted 5 years ago
POSTED BY: Hans Milton
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract