Discussion:
ScrollBar
(too old to reply)
fallenidol
2009-09-30 09:11:01 UTC
Permalink
Hello,

I am developing a control which requires smooth scrolling. I have noticed
that when you hold down the left or right scroll buttons there is a time
delay between each OnScroll or OnValueChanged event of around 62 milliseconds
(approx).

Is there anyway to get it to fire faster than this?

Thanks,
Paul
--
"If ignorance is bliss, then knock the smile off my face."
Eddie
2009-09-30 10:32:06 UTC
Permalink
Post by fallenidol
I am developing a control which requires smooth scrolling. I have noticed
that when you hold down the left or right scroll buttons there is a time
delay between each OnScroll or OnValueChanged event of around 62 milliseconds
(approx).
That's probably down to the keyboard repeat rate, isn't it?
Post by fallenidol
Is there anyway to get it to fire faster than this?
I think you might be better off looking at handling the OnKeyDown() and
OnKeyUp() events to control your scrolling behaviour. You could use
these to start and stop a timer with whatever interval you need.
--
Eddie ***@deguello.org
fallenidol
2009-09-30 10:53:02 UTC
Permalink
Hi,

Keyboard blink rate doesn't affect it and I can't use keyboard based
scrolling. It need to be the standard paradigm.

Thanks,
Paul
--
"If ignorance is bliss, then knock the smile off my face."
Post by Eddie
Post by fallenidol
I am developing a control which requires smooth scrolling. I have noticed
that when you hold down the left or right scroll buttons there is a time
delay between each OnScroll or OnValueChanged event of around 62 milliseconds
(approx).
That's probably down to the keyboard repeat rate, isn't it?
Post by fallenidol
Is there anyway to get it to fire faster than this?
I think you might be better off looking at handling the OnKeyDown() and
OnKeyUp() events to control your scrolling behaviour. You could use
these to start and stop a timer with whatever interval you need.
--
Eddie
2009-09-30 11:47:38 UTC
Permalink
Post by fallenidol
Keyboard blink rate doesn't affect it and I can't use keyboard based
scrolling. It need to be the standard paradigm.
In that case, how about using OnScroll() to start two timers.

1. The first timer has a short interval to perform whatever scrolling
action you need to do, and keeps repeating;

2. The second timer has an interval slightly longer than the normal
delay between OnScroll() calls. If you don't receive another OnScroll()
before this timer elapses, kill the first timer to stop scrolling. Each
OnScroll() call restarts this timer.

Any use?
--
Eddie ***@deguello.org
fallenidol
2009-09-30 12:00:02 UTC
Permalink
Hi,

Unfortunately can't do this as this is the whole problem... the OnScroll
event is only raised...at most...every 62ms if you hold down the left or
right scroll buttons. If you use the thumb track then it is raised instantly.
So i'm assuming that the scrollbar must have some kind of built in timer
inside base.OnScroll and/or base.OnValueChanged.

I think i'm going to have to write my own custom scrollbar.

Paul
--
"If ignorance is bliss, then knock the smile off my face."
Post by Eddie
Post by fallenidol
Keyboard blink rate doesn't affect it and I can't use keyboard based
scrolling. It need to be the standard paradigm.
In that case, how about using OnScroll() to start two timers.
1. The first timer has a short interval to perform whatever scrolling
action you need to do, and keeps repeating;
2. The second timer has an interval slightly longer than the normal
delay between OnScroll() calls. If you don't receive another OnScroll()
before this timer elapses, kill the first timer to stop scrolling. Each
OnScroll() call restarts this timer.
Any use?
--
Eddie
2009-09-30 12:54:42 UTC
Permalink
Post by fallenidol
Unfortunately can't do this as this is the whole problem... the OnScroll
event is only raised...at most...every 62ms if you hold down the left or
right scroll buttons. If you use the thumb track then it is raised instantly.
So i'm assuming that the scrollbar must have some kind of built in timer
inside base.OnScroll and/or base.OnValueChanged.
I think i'm going to have to write my own custom scrollbar.
Have you looked at the existing code for ScrollBar using Reflector? That
should allow you to understand the existing behaviour and decide on your
best course of action.
--
Eddie ***@deguello.org
fallenidol
2009-09-30 13:11:01 UTC
Permalink
good idea
--
"If ignorance is bliss, then knock the smile off my face."
Post by Eddie
Post by fallenidol
Unfortunately can't do this as this is the whole problem... the OnScroll
event is only raised...at most...every 62ms if you hold down the left or
right scroll buttons. If you use the thumb track then it is raised instantly.
So i'm assuming that the scrollbar must have some kind of built in timer
inside base.OnScroll and/or base.OnValueChanged.
I think i'm going to have to write my own custom scrollbar.
Have you looked at the existing code for ScrollBar using Reflector? That
should allow you to understand the existing behaviour and decide on your
best course of action.
--
Loading...