LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse wheel to adjust dial

Hi

 

I wonder if there is any way to use the mouse wheel to control the value of a knob?

I have tried to right click on the Knob -> Properties -> Key Navigation, but here can I only select items from the keyboard.

 

Kind regards,

Mattias

 

 

0 Kudos
Message 1 of 8
(3,170 Views)

Mattias

 

Done something similiar before and luckily for us there is a nice example

There you can see how to get the scrolling inputs.

 

Regards,

Jevon

0 Kudos
Message 2 of 8
(3,161 Views)

Hi Mattias,

 

There's no way to just configure the control to do this. You will have to implement this by yourself.

You can use the mouseAcquire VI to get the position of the mouse cursor and of the scroll wheel. If the cursor position is on top of your control (you can also use the "mouse enter"/"mouse leave" events to check for this), change the value based on the scroll wheel. You'll have to poll the mouse wheel with the mouseAcquire VI since there's no event for it.

 

Hope this helps,

Daniel

 

0 Kudos
Message 3 of 8
(3,151 Views)

Jevon,

 

Thank you for your quick reply and example.

However, I need to detect the scrollwheel, not the buttons. Is there some way to achieve that?

 

Regards,

Mattias

 

0 Kudos
Message 4 of 8
(3,150 Views)

Hi Mattias,

axis info contains the info you need.

 

Mike

Message Edited by MikeS81 on 03-25-2010 02:40 PM
0 Kudos
Message 5 of 8
(3,144 Views)

I made a modification to the example mentioned below.  This does what you want I think (LV 8.6).

 

 

Randall Pursley
0 Kudos
Message 6 of 8
(3,137 Views)

Hi Mattias.

 

As Mike said, that 'axis info' cluster you'll see in the example will have what you need. The element is called 'scrolling'. You'll see the value change while you scroll... albeit very very quickly.

 

Hope we've helped

0 Kudos
Message 7 of 8
(3,131 Views)

Now I understand!

Thank you very much for your time.

Kind regards,

Mattias

 

0 Kudos
Message 8 of 8
(3,092 Views)