Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Change programmatically the range of SliderDouble component

Hello,

 

Do you know how to programmatically change the minimum and the maximum value of a SliderDouble component?

I've tried using the property "Range" but Maximum and Minimum fields are in read-only.

 

Thank you in advance for your help.

 

Regards,

Cyrill

0 Kudos
Message 1 of 3
(4,903 Views)

You can set the Range property to a new value, instead of setting the sub-properties on the range. For example, to change just the minimum and keep maximum the same:


    slider.Range = new Range<double>( -1.0, slider.Range.Maximum );

~ Paul H
0 Kudos
Message 2 of 3
(4,898 Views)

Works perfectly!

 

Thanks Paul Smiley Happy

0 Kudos
Message 3 of 3
(4,892 Views)