How can I get the values from the slider after releasing the mouse button? Released callback, called when the slider is released. Now while I move the slider my program always hangs in Slider_ValueChange.
Not in the sense of freezes. Just constantly go there when I move the slider. I would like the program to go to Slider_ValueChange after the slider value is set.
Private Sub Slider1_MousePressed (EventData As MouseEvent)
SliderMousePressed = True
End Sub
Private Sub Slider1_ValueChange (Value As Double)
If SliderMousePressed Then Return
Slider1_DOValueChanged
End Sub
Private Sub Slider1_MouseReleased (EventData As MouseEvent)
SliderMousePressed = False
Slider1_DOValueChanged
End Sub
Private Sub Slider1_DOValueChanged
Log("Value Changed " & Slider1.Value)
End Sub
Sub Slider1_ValueChange (Value As Double)
Slider1Index = Slider1Index + 1
Dim MyIndex As Int = Slider1Index 'Slider1Index is a global Int variable
Sleep(300)
If MyIndex = Slider1Index Then
Log("New value: " & Value)
'do anything you like here
End If
End Sub
The behavior is not exactly the same. It updates after the slider was idle for 300ms.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.