Sep 9, 2024 Replies: 2 JNSlider allows you to put an icon at the left or right of a slider bar, or top or bottom if the control is vertical. Clicking the icon will expand or contract the slider. The slider can start visible or hidden. The size of the icon is set by the size of the control (eg. height x height if the control is horizontal). The seek bar can be locked open or closed. The main bar can be made up of one or more colours in a gradient. For example the default colour scheme (if you do not set one yourself) is an RGB gradient and would be achieved as follows B4X: Copy Dim clrMap1 As Map clrMap1.Initialize clrMap1.Put(0, xui.Color_Red) clrMap1.Put(50, xui.Color_Green) clrMap1.Put(100, xui.Color_Blue) JNSeekBar1.SetColorMap (clrMap1) There are more examples in the demo. There is a Width adjust property to change the thickness of the bars. Tested on B4A, B4J, B4I (Thanks @f0raster0) Based on the XUI B4X Seekbar. Attachments JNSlider.b4xlib JNSlider.b4xlib 3.6 KB · Views: 420 JNSliderDemo.zip JNSliderDemo.zip 383 KB · Views: 406 Last edited: Sep 11, 2024 Click to expand...
JNSlider allows you to put an icon at the left or right of a slider bar, or top or bottom if the control is vertical. Clicking the icon will expand or contract the slider. The slider can start visible or hidden. The size of the icon is set by the size of the control (eg. height x height if the control is horizontal). The seek bar can be locked open or closed. The main bar can be made up of one or more colours in a gradient. For example the default colour scheme (if you do not set one yourself) is an RGB gradient and would be achieved as follows B4X: Copy Dim clrMap1 As Map clrMap1.Initialize clrMap1.Put(0, xui.Color_Red) clrMap1.Put(50, xui.Color_Green) clrMap1.Put(100, xui.Color_Blue) JNSeekBar1.SetColorMap (clrMap1) There are more examples in the demo. There is a Width adjust property to change the thickness of the bars. Tested on B4A, B4J, B4I (Thanks @f0raster0) Based on the XUI B4X Seekbar.
f0raster0 Well-Known Member Licensed User Longtime User Sep 11, 2024 #2 John Naylor said: Tested on B4A & B4J but should work fine on B4i too if anyone would confirm. Click to expand... tested in Iphone, all good!
John Naylor said: Tested on B4A & B4J but should work fine on B4i too if anyone would confirm. Click to expand... tested in Iphone, all good!
J John Naylor Active Member Licensed User Longtime User Sep 11, 2024 #3 f0raster0 said: tested in Iphone, all good! Click to expand... Much appreciated thank you!