Scroll event Not fired when use mouse wheel

Hi, I notice that when I use mouse left button to drag scroll bar,

VerticalScrollBar.Scroll += new ScrollEventHandler(VerticalScrollBar_Scroll);

VerticalScrollBar_Scroll is fired I can catch the ScrollEventArgs event.

But when I use the mouse wheel to scroll, this event is NOT fired, the method
is not called.

How can I get around this?


Use a GoView.PropertyChanged event handler, looking for a change to the “DocPosition” property.

The things is the property changing event won’t tell the old value of the scroll bar, which is why I prefer VerticalScrollBar_Scroll(object sender, ScrollEventArgs e) method. How am I suppose to know how much to scroll?


Yes, that’s a mis-feature of System.ComponentModel.INotifyPropertyChanged, over which we, of course, have no control.

I suggest you keep the old value yourself, each time it changes.

Is there a way to know the scroll button scroll delta if I use some mouse tool?


Mouse wheel turns call GoView.ScrollLine, which uses the GoView.ScrollSmallChange property to compute a new view position and then sets the GoView.DocPosition property.