Slider Component jumps to middle for a split second when programatically changing thumb position

Whenever I programatically change the slider component's thumb position, the thumb position would jump to the middle for a split second before going to what I set it to in the blocks editor. This is annoying because it disturbs the flow of a clean interface. Is there any way to stop this from happening? Thanks.

Show an example of a simple project with this problem, because I didn't notice this problem in my case.

This problem happens when the MaxValue is constantly being updated. Here's a .aia file that recreates the problem:
sliderBug.aia (2.1 KB)

Yes, I can see in the code that after changing the max and min value the slider is set in the middle of the scale. I don't really know what it's for. On the other hand, without it, the slider would return an incorrect position value after changing the max or min.

I think that instead of changing the max value, you should recalculate accordingly how much the slider is supposed to move. What are you using the slider for? Maybe I can think of a workaround.

You might also consider using a canvas instead of a slider. If you try, you will definitely make a nicer slider than the original one...

See this topic, read the whole thing.

You can make a linear slider in a similar way.

Thinking out loud here. What if you have one slider visible and one invisible.
When you need to change the max value, do it on the invisible one. After the value is changed, you turn it visible and set the other one invisible.

I know it sounds complicated and you will have to come up with a little tracking system of which one is visible and which one is not, but if the glitch you mention is unavoidable and it really affects your app performance, this workaround might work, at least until it is fixed or you find another way of fixing it.

Does it sound like it's too much hammering for the size of the nail? :grimacing: