Hi,
I am trying to use the MashRangeSlider so that my user can choose a range of months between January to December.
Here is the screenshot of what I am trying to achieve.
When the user slides the range, I am supposed to capture the changed values via Sub rs_change(value As Map), but then the Sub rs_change(value As Map) is incomplete. It returns ONLY the FromValue. The ToValue is not available in the Map.
Unfortunately, the Sub rs_change(value As Map) has only the FromValue of the RangeSlider, the ToValue is not available in the Map
The values available in the Map {value=4} (This is the FromValue)
Any help is appreciated
I am trying to use the MashRangeSlider so that my user can choose a range of months between January to December.
Here is the screenshot of what I am trying to achieve.
When the user slides the range, I am supposed to capture the changed values via Sub rs_change(value As Map), but then the Sub rs_change(value As Map) is incomplete. It returns ONLY the FromValue. The ToValue is not available in the Map.
B4X:
Sub CreateRngSlider()
Dim rs As MashRangeSlider
rs.Initialize(page,"rs","")
rs.FromValue = "3"
rs.ToValue = "8"
rs.Grid = True
rs.SlideType = rs.EnumSlideType.isdouble
rs.AddValue("Jan").AddValue("Feb").AddValue("Mar")
rs.AddValue("Apr").AddValue("May").AddValue("Jun")
rs.AddValue("Jul").AddValue("Aug").AddValue("Sep")
rs.AddValue("Oct").AddValue("Nov").AddValue("Dec")
page.Cell(1,1).AddComponent(rs.ABMComp)
' Adding an ABMInput
Dim txtValue As ABMInput
txtValue.Initialize(page, "txtValue", ABM.INPUT_TEXT, "RangeSlider Values", False, "")
txtValue.IconName = "mdi-action-lock"
page.Cell(1,1).AddComponent(txtValue)
End Sub
Sub rs_change(value As Map)
Log("Map value is ")
Log(value)
Dim valuex As String = value.GetDefault("value","")
Dim txtvalue As ABMInput = page.Component("txtvalue")
txtvalue.Text = valuex
txtvalue.refresh
End Sub
Unfortunately, the Sub rs_change(value As Map) has only the FromValue of the RangeSlider, the ToValue is not available in the Map
The values available in the Map {value=4} (This is the FromValue)
Any help is appreciated