iOS Question Range SeekBar (Help)

walterf25

Expert
Licensed User
Longtime User
Hello everyone, i'm in need of some help, i was not able to find any library for a Range SeekBar, so I decided to try and create my first B4X Custom view, i have been able to create the slide bar with two knobs, one for the minimumValue and another one for the maximumValue.

I am also able to slide both knobs left or right and calculate the value based on the position of the knobs, now what i need help is figuring out how to highlighted trackbar so that it moves and gets resized according to the position of both left and right knobs.

Attached are two images so that you guys can get an idea, you see on the second picture the left knob has been moved but the highlighed track bar (blue bar) doesn't match the position of the leftknob.

I'm a little rusty on my Math so I need some help in figuring out how to accomplish this, does any one have any ideas?

Thanks in advance.

image1.png image0.png

P.S.
By the way the knobs, background trackbar and highlighted trackbar are all images.


Walter
 
Last edited:
Top