Nov 25, 2021 Replies: 4 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 AS RangeSeekBar.zip 11 KB · Views: 809 ASRangeSeekBar.b4xlib ASRangeSeekBar.b4xlib 2.2 KB · Views: 621 Last edited: Feb 24, 2024 Click to expand...
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
dongsool Member Licensed User Longtime User Dec 28, 2021 #2 There is a bug when I specify the values of value 1 and 2. B4X: Copy 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 AS RangeSeekBarTest.zip 10.6 KB · Views: 664
There is a bug when I specify the values of value 1 and 2. B4X: Copy ASRangeSeekBar1.Value1 = 20 ASRangeSeekBar1.Update ASRangeSeekBar1.Value2 = 40 ASRangeSeekBar1.Update Log(ASRangeSeekBar1.Value1) '40 Log(ASRangeSeekBar1.Value2) '100 and No function found. setValue~ getValue
Alexander Stolte Expert Licensed User Longtime User Dec 28, 2021 #3 Update 1.01 BugFix - set Value2 was linked to the wrong variable dongsool said: There is a bug when I specify the values of value 1 and 2. Click to expand... Thanks! dongsool said: ASRangeSeekBar1.Update Click to expand... You don't need to call this function, setValue already does this internally
Update 1.01 BugFix - set Value2 was linked to the wrong variable dongsool said: There is a bug when I specify the values of value 1 and 2. Click to expand... Thanks! dongsool said: ASRangeSeekBar1.Update Click to expand... You don't need to call this function, setValue already does this internally
dongsool Member Licensed User Longtime User Dec 29, 2021 #4 Alexander Stolte said: Update 1.01 BugFix - set Value2 was linked to the wrong variable Thanks! You don't need to call this function, setValue already does this internally Click to expand... Thank you for the quick update. Your libraries are so great. Thank you so much.
Alexander Stolte said: Update 1.01 BugFix - set Value2 was linked to the wrong variable Thanks! You don't need to call this function, setValue already does this internally Click to expand... Thank you for the quick update. Your libraries are so great. Thank you so much.
Alexander Stolte Expert Licensed User Longtime User Nov 19, 2023 #5 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: Copy ASRangeSeekBar1.mBase.Width = 250dip ASRangeSeekBar1.Base_Resize(ASRangeSeekBar1.mBase.Width, ASRangeSeekBar1.mBase.Height)
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: Copy ASRangeSeekBar1.mBase.Width = 250dip ASRangeSeekBar1.Base_Resize(ASRangeSeekBar1.mBase.Width, ASRangeSeekBar1.mBase.Height)