03-25-2010 08:23 AM
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
03-25-2010 08:33 AM
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
03-25-2010 08:37 AM
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
03-25-2010 08:37 AM
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
03-25-2010 08:39 AM - edited 03-25-2010 08:40 AM
Hi Mattias,
axis info contains the info you need.
Mike
03-25-2010 08:49 AM
I made a modification to the example mentioned below. This does what you want I think (LV 8.6).
03-25-2010 08:54 AM
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
03-25-2010 09:54 AM
Now I understand!
Thank you very much for your time.
Kind regards,
Mattias