B4A Library [B4X] [XUI] AS RangeSeekBar

I took the original B4XSeekBar code from @Erel and modified it to create a new view.

I spend a lot of time in creating views, some views i need by my self, but some views not and to create a high quality view cost a lot of time. If you want to support me, then you can do it here by Paypal or with a coffee.


ASRangeSeekBar
Author: Alexander Stolte
Version: 1.01

  • ASRangeSeekBar
    • Events:
      • TouchStateChanged (Pressed As Boolean)
      • ValueChanged (Value1 As Int, Value2 As Int)
    • Fields:
      • Interval As Int
      • MaxValue As Int
      • mBase As B4XView
      • MinValue As Int
      • Radius1 As Int
      • Radius2 As Int
      • ReachedLineColor As Int
      • ReachedLineSize As Int
      • Tag As Object
      • ThumbColor As Int
      • UnreachedLineColor As Int
      • UnreachedLineSize As Int
    • Functions:
      • Class_Globals As String
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • getValue1 As Int
      • getValue2 As Int
      • Initialize (Callback As Object, EventName As String) As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • setValue1 (v As Int) As String
      • setValue2 (v As Int) As String
      • Update As String
        Redraws the control
    • Properties:
      • Value1 As Int
      • Value2 As Int
Changelog
  • 1.00
    • Release
  • 1.01
    • BugFix - set Value2 was linked to the wrong variable
  • 1.02
    • Base_Resize is public now
Have Fun
 

Attachments

  • AS RangeSeekBar.zip
    11 KB · Views: 414
  • ASRangeSeekBar.b4xlib
    2.2 KB · Views: 165
Last edited:

dongsool

Member
Licensed User
Longtime User
There is a bug when I specify the values of value 1 and 2.

B4X:
    ASRangeSeekBar1.Value1 = 20
    ASRangeSeekBar1.Update
   
    ASRangeSeekBar1.Value2 = 40
    ASRangeSeekBar1.Update
   
    Log(ASRangeSeekBar1.Value1) '40
    Log(ASRangeSeekBar1.Value2) '100

and No function found. setValue~ getValue
 

Attachments

  • AS RangeSeekBarTest.zip
    10.6 KB · Views: 302

Alexander Stolte

Expert
Licensed User
Longtime User

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.02
    • Base_Resize is public now
Base_Resize is public
You should call it in B4A after modifying B4XSeekBar.mBase size (it is called automatically in B4i, B4J).
B4X:
ASRangeSeekBar1.mBase.Width = 250dip
ASRangeSeekBar1.Base_Resize(ASRangeSeekBar1.mBase.Width, ASRangeSeekBar1.mBase.Height)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…