WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Slider control onChange event fires on setValue call, D, August 8, 2003
     Re:Slider control onChange event fires on setValue call, Erik Arvidsson, August 9, 2003

Subject: Re:Slider control onChange event fires on setValue call From: Erik Arvidsson Date: August 9, 2003
There are 2 simple solutions/workaround that you can use.

1. Use a timer to make sure that the change event is not happening too often.
2. Disable the onchange for a while

var oc = slider.onchange;
slider.onchange = null;
slider.setValue(v);
slider.onchange = oc;


I agree that a valueIsAdjusting flag might be useful but it is not crucial. If you really need it you can easily create a sub class that adds support for this.

erik

_______________________________________________

Is there a way to use the setValue to move the slider in code but not let it call the onChange event of the slider?
The javax.swing.BoundedRangeModel interface defined by Sun for Java which was used to model the slider bar has a setValueIsAdjusting property that doesn't look like its supported with these sliders.
Thanks
D



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX