Sliders affecting Sliders?

The last problem I had was answered perfectly :) So here I am with annother one.

In a rollout, is it possible for one sliders value to control annother sliders maximum value?

I would really appreciate any help,
cheers.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexholmes's picture

Thanks!

Thank you! Exactly what I needed

jos's picture

sure

you can set the range with
slider.range = [min,max,value]
example:

rollout roll_slidertest "slider"
(
	slider sl1 "value: 0" range:[-10,10,0]
	slider sl2 "value: 0" range:[-10,10,0]
	slider sl3 "change max sliders"  range:[0,20,10]
 
	on sl1 changed arg do
	(
		sl1.text = ("value: " + arg as string)
	)
	on sl2 changed arg do
	(
		sl2.text = ("value: " + arg as string)
	)
	on sl3 changed arg do 
	(
		sl3.text = (" max value: " + arg as string)
		sl1.range = [-10,arg,sl1.range[3]]
		sl2.range = [-10,arg,sl2.range[3]]
	)
)
createDialog roll_slidertest 200 200

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.