Project

General

Profile

WSlider doing update in sliderMoved instead of valueChanged

Added by Jason D over 2 years ago

Hi,

Is it possible to do update with sliderMoved instead of valueChanged signal of a WSlider?
[[[https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WSlider.html#ac7257988652fc39910b1088cf02ecc5a]]] said that 'the slider value is not changed while dragging the slider' so I couldn't use the value.

I tried to call javascript to update a WLineEdit text on the page when sliding and try to update with the text when sliding. But the new value couldn't be obtained either. I know that's a feature for security, but is there a way to make it work?

Any help is greatly appreciated, thanks.

Best Regards,
Jason Dong


Replies (1)

RE: WSlider doing update in sliderMoved instead of valueChanged - Added by Bruce Toll over 2 years ago

Hi,

When connected to the sliderMoved() JSignal, the current slider position (similar to value if drag was released) is provided as the first argument. Where the documentation says "the slider value is not changed while dragging the slider", I believe it is specifically referring to the value returned by the WSlider's value() function.

You can grep the wt source for example usage of sliderMoved. Hope this helps.

    (1-1/1)