We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › controlP5.addSlider returns void edit: Never mind.
Page Index Toggle Pages: 1
controlP5.addSlider returns void edit: Never mind. (Read 713 times)
controlP5.addSlider returns void edit: Never mind.
Jul 11th, 2009, 10:03am
 
edit.
I had a setId function attached at the end of addSlider...

but it should return Slider according to the documentation. I need access to setMax() and setMin(), is there another way of creating a slider that allows me to store it in a variable?

/P
Re: controlP5.addSlider returns void edit: Never mind.
Reply #1 - Jul 11th, 2009, 10:34pm
 
hi there,
addSlider does return a reference to a Slider, setId does return void.
what you can do though:
Code:

Slider s;
s = controlP5.addSlider("slider",100,167,128,100,160,10,100);
s.setId(100);
s.setMin(120);
s.setMax(150);


best,
andreas
Page Index Toggle Pages: 1