ofxSimpleGuiToo reset a controllers min or max?

Sorry if this is an easy one, but I can’t seem to figure this out- I want to change the value of the ‘max’ property for a slider dynamically.

myMax = 1000;
gui.addSlider(“videoPlayhead”, 0, 0, myMax);

Once it has been created as above, how do I then update ‘myMax’ after creation?

found a fix. not sure if this is the right way to do it?

float myMax = 1000;
ofxSimpleGuiSliderFloat *videoSlider = &gui.addSlider(“videoPlayhead”, 0, 0, myMax);
myMax = 2000;
videoSlider->max = myMax;

This is also good for testing against mouse events…
if(videoSlider->isMouseDown()) doStuff();