 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Steve Fear Guest
|
Posted: Wed Mar 30, 2005 11:06 pm Post subject: Scrolling Size on Mouse Scroller |
|
|
Hi,
I'm stumped on how I can set the scrolling size property for the mouse
scroller.
I want to use the mouse wheel to adjust a value in a LED control. Right now
the code works fine except for the increments being set to the mouse
scrolling size.
I can't seem to find any reference to this property. Can anyone point me in
the right direction?
Thanks
Steve
|
|
| Back to top |
|
 |
adam Guest
|
Posted: Thu Mar 31, 2005 4:15 pm Post subject: Re: Scrolling Size on Mouse Scroller |
|
|
| Quote: | I can't seem to find any reference to this property. Can anyone point me
in
the right direction?
|
Activities on a mouse wheel generate messages like WM_HSCROLL and
WM_VSCROLL
which in return gives you information like SB_THUMBPOSITION and
SB_THUMBTRACK.
Just look Win32 Help about Scroll Bars. You will find plenty of info on
this subject.
--
A
|
|
| Back to top |
|
 |
Bob Gonder Guest
|
Posted: Thu Mar 31, 2005 4:37 pm Post subject: Re: Scrolling Size on Mouse Scroller |
|
|
Steve Fear wrote:
| Quote: | I'm stumped on how I can set the scrolling size property for the mouse
scroller.
|
This sounds a bit like it might be a VCL question, which would be
better asked in the .vcl.components.using group.
If Adam's answer isn't what you were after, then...
You might check the registry entry
HKEY_CURRENT_USERControl PanelDesktopWheelScrollLines
to see what the setting is.
I would advise against changing the value because changing user
settings tends to anger users.
| Quote: | I want to use the mouse wheel to adjust a value in a LED control. Right now
the code works fine except for the increments being set to the mouse
scrolling size.
|
You might be able, though, to count the increase messages and divide
by the scroll rate before changing the control. (Like change the
control once every "WheelScrollLines" increases)
|
|
| Back to top |
|
 |
Danila Vershinin Guest
|
Posted: Thu Mar 31, 2005 4:52 pm Post subject: Re: Scrolling Size on Mouse Scroller |
|
|
Hi Steve,
khe, wel are talking about OnMouseWheel event handler, right? then I could
help
"Steve Fear" <slfear (AT) comcast (DOT) net> wrote
| Quote: | Hi,
I'm stumped on how I can set the scrolling size property for the mouse
scroller.
I want to use the mouse wheel to adjust a value in a LED control. Right
now
the code works fine except for the increments being set to the mouse
scrolling size.
I can't seem to find any reference to this property. Can anyone point me
in
the right direction?
Thanks
Steve
|
|
|
| Back to top |
|
 |
Steve Fear Guest
|
Posted: Thu Mar 31, 2005 10:29 pm Post subject: Re: Scrolling Size on Mouse Scroller |
|
|
Adam,
Thanks for the response. The wheel mouse events you mention are for
scrollbars only. This was the first place I looked. What I'm using the wheel
for is not for scrolling via the scrollbars. I have a couple of controls
where their behavior depends on direction and number of rotations of the
wheel.
Through my mouse properties I have my scroll size set to 3 lines per
rotation. Given that, when my control sees that the wheel has moved one
rotation it actually behaves as if the wheel rotated 3 times. This behavior
is happening outside of the control and I can't find any way to adjust it.
Steve
"adam" <eve@apple> wrote
| Quote: |
I can't seem to find any reference to this property. Can anyone point me
in
the right direction?
Activities on a mouse wheel generate messages like WM_HSCROLL and
WM_VSCROLL
which in return gives you information like SB_THUMBPOSITION and
SB_THUMBTRACK.
Just look Win32 Help about Scroll Bars. You will find plenty of info on
this subject.
--
A
|
|
|
| Back to top |
|
 |
Steve Fear Guest
|
Posted: Thu Mar 31, 2005 11:06 pm Post subject: Re: Scrolling Size on Mouse Scroller |
|
|
Bob,
Thanks for your reply. You're right about changing the WheelScrollLines in
the registry. It's a situation I want to avoid.
I've tried your idea about adjusting the count prior to giving it to the
control but that doesn't work. I did find that if I put a trackbar on the
form with the LED control and have the LED value change with the trackbar
position, I can get the desired effect with the mouse wheel. I guess I can
hide the trackbar since it's redundant.
Steve
"Bob Gonder" <notbg (AT) notmindspring (DOT) invalid> wrote
| Quote: | Steve Fear wrote:
I'm stumped on how I can set the scrolling size property for the mouse
scroller.
This sounds a bit like it might be a VCL question, which would be
better asked in the .vcl.components.using group.
If Adam's answer isn't what you were after, then...
You might check the registry entry
HKEY_CURRENT_USERControl PanelDesktopWheelScrollLines
to see what the setting is.
I would advise against changing the value because changing user
settings tends to anger users.
I want to use the mouse wheel to adjust a value in a LED control. Right
now
the code works fine except for the increments being set to the mouse
scrolling size.
You might be able, though, to count the increase messages and divide
by the scroll rate before changing the control. (Like change the
control once every "WheelScrollLines" increases)
|
|
|
| Back to top |
|
 |
Steve Fear Guest
|
Posted: Thu Mar 31, 2005 11:13 pm Post subject: Re: Scrolling Size on Mouse Scroller |
|
|
Hi Danila
Yes, I'm working in the OnMouseWheel event. I've been able to work around
the problem. The easiest way would be to do what Bob suggested but I had to
add an extra control to get the behavior I wanted.
Thanks
Steve
"Danila Vershinin" <danprep (AT) yahoo (DOT) com> wrote
| Quote: | Hi Steve,
khe, wel are talking about OnMouseWheel event handler, right? then I
could
help
"Steve Fear" <slfear (AT) comcast (DOT) net> wrote in message
news:424b3092 (AT) newsgroups (DOT) borland.com...
Hi,
I'm stumped on how I can set the scrolling size property for the mouse
scroller.
I want to use the mouse wheel to adjust a value in a LED control. Right
now
the code works fine except for the increments being set to the mouse
scrolling size.
I can't seem to find any reference to this property. Can anyone point me
in
the right direction?
Thanks
Steve
|
|
|
| Back to top |
|
 |
Steve Fear Guest
|
Posted: Thu Mar 31, 2005 11:18 pm Post subject: Re: Scrolling Size on Mouse Scroller |
|
|
Bob,
Thanks for the reply. I agree about changing the registery. It's something I
want to avoid.
I've tried to adjust my LED value to take into account the scroll size
setting, but that doesn't seem to work. I was able to work around the
problem by adding a trackbar and use the trackbar position to adjust the LED
value. Once I do that I can use the mouse wheel to adjust the LED value one
digit at a time. Since I don't need the trackbar I can hide that control.
Thanks,
Steve
"Bob Gonder" <notbg (AT) notmindspring (DOT) invalid> wrote
| Quote: | Steve Fear wrote:
I'm stumped on how I can set the scrolling size property for the mouse
scroller.
This sounds a bit like it might be a VCL question, which would be
better asked in the .vcl.components.using group.
If Adam's answer isn't what you were after, then...
You might check the registry entry
HKEY_CURRENT_USERControl PanelDesktopWheelScrollLines
to see what the setting is.
I would advise against changing the value because changing user
settings tends to anger users.
I want to use the mouse wheel to adjust a value in a LED control. Right
now
the code works fine except for the increments being set to the mouse
scrolling size.
You might be able, though, to count the increase messages and divide
by the scroll rate before changing the control. (Like change the
control once every "WheelScrollLines" increases)
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|