B4J Question Such view exists ? slider (seekbar) to show decimal range

peacemaker

Expert
Licensed User
Longtime User
Hi, All

Do we have among B4X views some sider or seekbar (better if vertical + horizontal) that can show a decimal range, say -25.0, -24.9 ... 0.0 ... 24.9, 25.0 and allow to select\precisely adjust value being of small size (say 10%x of container)?
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Yes, tried. Extra label is needed to show the result of calculation, but the main hardness is that small view cannot slide quite smoothly.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
To have any chance of getting the precision you require, the view would need to have a width the same or larger as the amount of options. So -25 to 25 with a precision of 0.1 will require at least 501 pixels (1 for 0), and would still not be easy to control at pixel resolution.

I did something similar a long time ago but allowing dragging on a label, left / right in steps of 10 and up and down with an steps of 1. (you would need to scale it as you needed). You could also add precision by using a modifier key (control?) and then move in steps of 0.1. Visual feedback was limited to the label with the value. You could always add a seek bar showing an approximation of the value.

Another alternative could be to use a circular seek bar, which would probably take similar total area, but could be positioned in a square pane.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…