bottom that control a slide

HI,
sorry for my bad english,
Who knows how to create a script like this?

I added in attirbute holder a slide and 2 bottoms
I would like that using the first bottom the slide go to value 0 and if I clik the second bottom the slide go to value 100 without move the slide manually...
How can I do that???

Many thanks!

Lorenzo

Comments

Comment viewing options

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

One more example

testCA = attributes SlideControls
(
	parameters test rollout:testroll
	(
		ctrl1 type:#integer ui:sld
		ctrl2 type:#integer ui:spn
	)
	rollout testroll "MinMax Slide"
	(
		slider sld "" orient:#horizontal ticks:2 range:[0,1e2,0] width:150
		spinner spn "Value:" range:[0,1e2,0] 
		button btnmin "Min" across:2
		button btnmax "Max"
		on sld changed val do spn.value = val
		on spn changed val do sld.value = val
		on btnmin pressed do sld.value = 0
		on btnmax pressed do sld.value = 100
 
	)
)
testObj = Dummy name:"CA_Helper"
CustAttributes.add testObj testCA #Unique --BaseObject:false

barigazy

jos's picture

If something isn't clear just

If something isn't clear just ask...

--caTest = custAttributes.getDef $.'Attribute Holder'.test
--attributes test
--redefine:caTest
caTest=attributes test
(
	parameters params1 rollout:ctrls
	(
		testVal type:#float ui:(sliTest,spnTest) 
	)
 
	rollout ctrls "test"
	(
		local range=[0,100,0]
		button btnLeft "0" align:#left across:2
		button btnRight "100" align:#left 
 
		slider sliTest "slider" range:range align:#right ticks:0
		spinner spnTest range:range align:#right
 
		on btnRight pressed do
		(
			testVal = 100
		)
		on btnLeft pressed do
		(
			testVal = 0
		)
	)
 
)
 
custAttributes.add $.modifiers[1] caTest

Comment viewing options

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