There seems to be a problem with scrollbars when the user drags the thumb
quickly and releases. I've hit it in my application, and I found a thread in
the archive about it:
http://www.escribe.com/computing/pcpqa/index.html?by=OneThread&t=Scrollbars%
20problem

I had been thinking that the problem came about because I was using a
scrollbar in conjunction with a table, but someone in the above thread
mentioned, and I have confirmed, that the problem exists in the MemoPad
itself, if you have a large memo.

The problem, briefly, is that if you drag the scrollbar's thumb quickly and
release it, the thumb (and the thing being scrolled) will first go to the
new location but then "snap" back to (or near) the original location.

I have definitively shown in my testing that this is a bug in the Palm code
that deals with scrolling events. The reason for the snap back is that the
last sclRepeatEvent (and the corresponding sclExitEvent) contains the value
for the original location, so the code just dutifully goes where it's told
to go. For example, if you start with the scrollbar at the top, value zero,
then grab and drag the thumb down, you'll get sclRepeatEvents for some of
the intervening values, say first a 6, then a 10, then a 16, for example.
But then, when the user has, in fact, released the thumb at the location
corresponding to value 16, the system sends one final sclRepeatEvent with a
value of zero (and, of course, a sclExitEvent, also with a value of zero).

I have tried in vain to come up with some way to deal with this problem in
my code, but I can't find any way to definitively identify one of these
erroneous "snap-backs". Has anyone successfully found a workaround? I even
thought of looking for the penUp event, thinking that surely it would come
before that last, erroneous sclRepeatEvent, but it doesn't.

And can someone from Palm -- Danny Epstein or David Fedor maybe -- comment
on this bug? Is it known to Palm? Why has it continued to exist until now?
Does anyone at Palm know of a workaround?

--Jim Preston







-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to