11-15-2006 03:34 PM
11-15-2006 03:40 PM
Ok it took me a little to figure this out, but what is happening is that you are geting mutliple valid Value Change events, and they are all valid.
Click and hold down on the arrow and notice that you it will start changing the value a ton. This is what we expect the scrollbar to do. The mouse down one shows the same behavior.
Well when you simply click on the Scrollbar there is a timing issue. How fast of a clicker are you? If you click real fast: 1 change. If your click is a little slower: 2 changes.
11-15-2006 03:41 PM
11-15-2006 04:02 PM
11-16-2006 07:20 AM
11-16-2006 09:47 AM
In my opinion as you are holding it down the value is changing. There is really no difference between grabbing the scrollbar and draging it or holding the mouse down on the arrow. Both actions cause the scrollbar to change values as it travels in what ever direction.
If the holding down only counted as 1 value change which one would it be. For example in the web navigator I have a scrollbar on the right. If I click and drag it around it constantly moves the age like we all expect. Therefore it changed values like we expect. Now if I click and hold on the arrow it also changes the page while I am holding. If it only changed the value once then 1 of 2 things would happen. 1. The page would move a little, and it would not matter how long you held it that would do nothing. 2. The page would not change until i actually mouse uped and then the entire page would snap to the final value I choose.
For me it makes sense that I should get all the value changes, and I have used that in a bunch of applications where I wanted to mimic a scrollbar moving a page.
11-16-2006 10:01 AM
11-16-2006 10:16 AM
11-16-2006 10:34 AM
Ok I think I see what you are talking about... but I am not sure. Is the issue that as you scroll around sometimes the Old and New value are equal. Therefore the value didn't change? If I hold the arrow down just long enough to get the 2 value changes to fire I noticed that the results are (old and new value) 0 and 1 then 1 and 1. So the second value change never actually changed or one of the values isn't reported correctly.
11-16-2006 10:44 AM
And while we're talking about continuous events, how about adding an option to events like mouse move that will allow us to limit the number of events?
For instance, fire an event only every 30 pixels or every 100 ms or fire a final event when the mouse hasn't moved for 200 ms.
Doing the first part in the code is relatively simple, but the end of the movement is more complex.