Change the min/max value of a Slider dynamically

is there a way of changing the min / max value of a slider in runtime?

slider->setRange(newmin, newmax);

thanks! this is from the editor. an option to do this from the processor?

You can get your editor subclass object by casting the editor base class you can get from getActiveEditor() in your AudioProcessor subclass. Things to note, however :

  1. There might not be a GUI editor object to use since plugins must also work without a GUI editor. (getActiveEditor() may return a null pointer.)
  2. You must not call GUI methods directly (such as Slider::setRange) from other threads. (Which certainly will be used in the AudioProcessor methods.) You must somehow arrange things so that the setRange call happens from the GUI thread.
1 Like

thank you very much!