It seems in the releases 2025 setting a slider.value triggers a ValueChange event. If I am opening the screen to set slidervalue I can’t set the value without ValueChange event being triggered?
Previous releases did not have this issue.
I make it global for the window it’s on, so if I have multiple documents open, it doesn’t affect others, and I can use it for anywhere I set something in code that can trigger an event - i.e. the TextChanged event of a TextArea, etc.
I usually subclass the control and add a method called something like SetValueWithoutEvent that does all that hopscotch to avoid firing the event. It involves adding a private Boolean property, implementing the ValueChanged event, creating a new ValueChanged event and then checking the value of the property before raising the event:
Class MySlider
Private Property suppressEvent as Boolean
Event Definition ValueChanged
Event Handler ValueChanged
If not suppressEvent then
RaiseEvent ValueChanged
End if
Sub SetValueWithoutEvent(value as integer)
SuppressEvent = true
Self.value = value
SuppressEvent = false