F Frank.G Member Licensed User Longtime User Jun 16, 2019 #1 Hi Community, I just bought B4A today and already wrote my first program. In that program i am using B4AFluidSlider to select values between 25 and 500. Basically I would need the values to change in steps of 25, as selecting the detailed value one by one stepwidth is very hard to do. I always end up going up and down between the value I like to have. I then changed the slider values from 1 to 20 and multiply the resulting value with 25. That works but now the bubble doesnt show me the actual value wanted but the value between 1 and 20. My question now is how can I optain this? Either coarse stepping of values or a custom indication in the bubble. The search didn't brought anything up so I am asking here. Kind regards Frank Edit: typo Last edited: Jun 16, 2019
Hi Community, I just bought B4A today and already wrote my first program. In that program i am using B4AFluidSlider to select values between 25 and 500. Basically I would need the values to change in steps of 25, as selecting the detailed value one by one stepwidth is very hard to do. I always end up going up and down between the value I like to have. I then changed the slider values from 1 to 20 and multiply the resulting value with 25. That works but now the bubble doesnt show me the actual value wanted but the value between 1 and 20. My question now is how can I optain this? Either coarse stepping of values or a custom indication in the bubble. The search didn't brought anything up so I am asking here. Kind regards Frank Edit: typo
moster67 Expert Licensed User Longtime User Jun 16, 2019 #2 Not sure which version you are using... mine: https://www.b4x.com/android/forum/threads/b4afluidslider.91605/ or the one by @Star-Dust https://www.b4x.com/android/forum/threads/b4a-fluidslider-no-wrap.91719/ For mine, the original wrapper does not provide a step property but if you use the other one by @Star-Dust, which has B4X sources included, then you can perhaps add this property yourself. Last edited: Jun 16, 2019 Upvote 0
Not sure which version you are using... mine: https://www.b4x.com/android/forum/threads/b4afluidslider.91605/ or the one by @Star-Dust https://www.b4x.com/android/forum/threads/b4a-fluidslider-no-wrap.91719/ For mine, the original wrapper does not provide a step property but if you use the other one by @Star-Dust, which has B4X sources included, then you can perhaps add this property yourself.
F Frank.G Member Licensed User Longtime User Jun 17, 2019 #3 moster67 said: Not sure which version you are using... mine: https://www.b4x.com/android/forum/threads/b4afluidslider.91605/ or the one by @Star-Dust https://www.b4x.com/android/forum/threads/b4a-fluidslider-no-wrap.91719/ For mine, the original wrapper does not provide a step property but if you use the other one by @Star-Dust, which has B4X sources included, then you can perhaps add this property yourself. Click to expand... Thx all for the feedback. @moster67 I see. Thats a possibility For now I used your wrapped version. I will switch over to the other version and try to add a step property Greez Frank Upvote 0
moster67 said: Not sure which version you are using... mine: https://www.b4x.com/android/forum/threads/b4afluidslider.91605/ or the one by @Star-Dust https://www.b4x.com/android/forum/threads/b4a-fluidslider-no-wrap.91719/ For mine, the original wrapper does not provide a step property but if you use the other one by @Star-Dust, which has B4X sources included, then you can perhaps add this property yourself. Click to expand... Thx all for the feedback. @moster67 I see. Thats a possibility For now I used your wrapped version. I will switch over to the other version and try to add a step property Greez Frank
F Frank.G Member Licensed User Longtime User Jun 17, 2019 #4 So, without going to much in the Moduldetails (after the second day using this software) as suggested, I created a kind of snap-to-grid sub. Code: Copy Sub B4AFluidSlider1_OnPositionChanged (value As Int) End Sub Sub B4AFluidSlider1_OnEndTracking Dim p As String = B4AFluidSlider1.GetValue / 25 B4AFluidSlider1.SetValue(NumberFormat(p,1,0) * 25) If EditText1.Text <> "" Then refresh End If End Sub When releasing the slider it "snaps" to the next nearest 25 step. The refresh sub updates my B4ATable when the selection is done. Greetz Frank Upvote 0
So, without going to much in the Moduldetails (after the second day using this software) as suggested, I created a kind of snap-to-grid sub. Code: Copy Sub B4AFluidSlider1_OnPositionChanged (value As Int) End Sub Sub B4AFluidSlider1_OnEndTracking Dim p As String = B4AFluidSlider1.GetValue / 25 B4AFluidSlider1.SetValue(NumberFormat(p,1,0) * 25) If EditText1.Text <> "" Then refresh End If End Sub When releasing the slider it "snaps" to the next nearest 25 step. The refresh sub updates my B4ATable when the selection is done. Greetz Frank