Slider Increments

Hi,
i have a number of sliders as part of an app but i need some how set them to only pick up certain increments and i cannot see any option like this. For instance slider1 is range 0 - 3 but i only want the slider to show 0 0.5 1 1.5 2 2.5 3

And for slider 2 which is 0 to 35 i only want it in 5s.

Is there anyway to do this or am i better using a different set of components?

THanks

Tony

You could do it "long hand", something like this (for 0-3 scale):
image

Thanks i did think of this but wow that is hardwork i suppose you could put some other logic to try and cut down the amount of ifs but i am now thinking spinner widget may be easier

Tony

Yes, there is some Maths in there somewhere to do it programmatically, but brain not working today :wink:

I would use List Pickers, and load their .Elements in for each number loops at startup.

Maths brain in gear today.

For example, if you have a range of 0 - 50 and you want to increment by 5, use the quotient block, divide the thumb position by 5 to get the quotient, then multiply by 5 to get the number you want. You should be able to translate this to other ranges, although it becomes more difficult if you want decimal points, etc.

Try this:

Blocks

slider2

Doesn't have to be that complicated....

For range 0 - 3 by 0.5 increments, set slider to a range of 0 - 6, then this block

Yes, but in my case you get also the correct value from the Slider.ThumbPosition.

OK, for the 0-3 example (slider range 0 - 6, double the required...):

image

But in my way the Slider.TumbPosition returns the correct values (only the following 7):
0, 0.5, 1, 1.5, 2, 2.5, 3.

I am not getting something here....

1 Like

Looks like i really started something here :slight_smile:

but you should have an answer @LostElements ?

Yes going to give a few options a try. THankyou alll