P
Peter Row
Hi,
I have created a user control consisting of a textbox and a separate
vertical scroll bar.
The textbox is filled with data. However there could be lots of data
so I only fill the textbox with enough to fill the space visible without
scrolling. Having set the min and max values of my separate vertical
scrollbar I use that to scroll the data. So for example the textbox
could be displaying 50 lines of data but in actual fact there is 1000
lines of data. So my scrollbar will have min = 0, max = 1000.
Now the thing I want to do is check if the user only scrolled 1 line.
So I add a handler to the scroll event of my vertical scroll bar.
I then click the down arrow on the scroll bar. BUT this causes the
scroll event to be fired twice!
The first time it fires the args of the event tell me the ScrollEventType
was SmallIncrement (which is what I expect and want) and the
difference between the current value and the new value is 1
(which is what I expect and want given my vsb's properties).
However it then immediately gets fired again, but this time the
ScrollEventType is EndScroll and the current and new values are
the same.
Anybody have any ideas why the event is being fired twice?
Regards,
Peter
I have created a user control consisting of a textbox and a separate
vertical scroll bar.
The textbox is filled with data. However there could be lots of data
so I only fill the textbox with enough to fill the space visible without
scrolling. Having set the min and max values of my separate vertical
scrollbar I use that to scroll the data. So for example the textbox
could be displaying 50 lines of data but in actual fact there is 1000
lines of data. So my scrollbar will have min = 0, max = 1000.
Now the thing I want to do is check if the user only scrolled 1 line.
So I add a handler to the scroll event of my vertical scroll bar.
I then click the down arrow on the scroll bar. BUT this causes the
scroll event to be fired twice!
The first time it fires the args of the event tell me the ScrollEventType
was SmallIncrement (which is what I expect and want) and the
difference between the current value and the new value is 1
(which is what I expect and want given my vsb's properties).
However it then immediately gets fired again, but this time the
ScrollEventType is EndScroll and the current and new values are
the same.
Anybody have any ideas why the event is being fired twice?
Regards,
Peter