tags:

views:

43

answers:

1

I'm using the SliderBar from the GWT Incubator in one of my current projects.

I want to add a handler which fires whenever the value of the slider changes, but I'm not sure which handler I need to add to get this to work, or whether I need to write one of my own.

Thanks

+1  A: 

SliderBar has a method addChangeListener() which takes a ChangeListener whose onChange() method will be called when the slider is moved.

It's worth mentioning that ChangeListener has been deprecated since GWT 1.6 (as have all *Listeners), so SliderBar should probably be updated to use the "new hotness" ChangeHandler, but adding a ChangeListener will still work in the meantime.

Jason Hall
I must have missed that as it was deprecated. It actually did a better job than I expected as it is called at every value the slider passes, not just the one it stops at (which is ideal for what I'm after doing). Thanks
Lee