Changing values with mouse wheel

deejay_totoro

Registered User.
Local time
Today, 12:50
Joined
May 29, 2003
Messages
169
Hello,

Would anyone know if it is possible to change the value of a field using the mouse wheel?

For example, I am currently using two buttons either side of a text box, that when clicked will increase or decrease the value in the field.

Could this be achieved using the mouse wheel? for example to increase or decrease the value by 10?

Cheers!

dj_T
 
I don't know about that ... what I do know is that I've done it before using a Microsoft Slider Control (under the Active X controls).

The thing is, you won't see a Scroll event for the control, but you can invoke it by calling it as such:

Code:
Private Sub sldSlideControlName_Scroll()
 
      'do whatever when you use the mouse wheel
 
End Sub

I don't know if this Scroll event is available to other controls. If you do a search on this event there may be some other information out there - but I liked the look of the slider control and it met my requirements. It's properties is such that you can adjust the value increments and tick marks, etc. The only thing is that the slider control has to have the focus in order for the mouse wheel to work. So you could use a mouse wheel, or click the little hooya to move the arrow up/down or right/left depending on how it is oriented. It's quite tricky to learn and work with - but once you get it, it works great.

-dK
 
Another approach is to use a listview but only have it the height of a text box. You will still get the up and down arrows to the right of the control which the user can use to scroll the value up or down. Has its limitations but it does work.

David
 

Users who are viewing this thread

Back
Top Bottom