LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use mouse scroll wheel to change numeric control

Mine is a snippet that you should be able to drag from your browser onto a block diagram and have automagically converted to code.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 11 of 21
(1,045 Views)

jcarmody, that would be cool.  But when I dragged it onto a blank block diagram, all I got is a text label:

http://forums.ni.com/t5/image/serverpage/image-id/84118iC87C3DA23C0B55EF/image-size/original?v=mpbl-...

What am I missing?  Thanks.

0 Kudos
Message 12 of 21
(1,038 Views)

crossrulz and jcarmody, your vi works great for a single numeric control.  How do I handle multiple numeric controls?  I created an event loop for each of the numeric controls.  But the mouse enter/leave events only fire up for the first numeric control.  And when entered in the first numeric control, the scroll takes turn changeing values of all numeric controls.  Please see atached.  Thanks.

0 Kudos
Message 13 of 21
(1,033 Views)

crossruls and jcarmody, nevermind.  I neglected to edit the events handled by the additional loops.  Changed them to "Numeric 2" Mouse Enter, ... etc and it works fine.  But somehow in my main application, the mouse never leaves.  That's what prompted me to try the multi-numeric thing.

0 Kudos
Message 14 of 21
(1,031 Views)

@richard.koo wrote:

jcarmody, that would be cool.  But when I dragged it onto a blank block diagram, all I got is a text label:

http://forums.ni.com/t5/image/serverpage/image-id/84118iC87C3DA23C0B55EF/image-size/original?v=mpbl-...

What am I missing?  Thanks.



I think that's an issue with the way your browser handles dragging images.  Try saving the image to your computer and dragging it into the block diagram from there.  In Windows XP, I save snippets to my desktop then drag them onto the BD from there.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 15 of 21
(1,019 Views)

@jcarmody wrote:

@richard.koo wrote:

jcarmody, that would be cool.  But when I dragged it onto a blank block diagram, all I got is a text label:

http://forums.ni.com/t5/image/serverpage/image-id/84118iC87C3DA23C0B55EF/image-size/original?v=mpbl-...

What am I missing?  Thanks.



I think that's an issue with the way your browser handles dragging images.  Try saving the image to your computer and dragging it into the block diagram from there.  In Windows XP, I save snippets to my desktop then drag them onto the BD from there.


There's an issue with Firefox and, I believe, with Chrome.

 

There's a Quick Drop plugin available which is a useful workaround for this:

https://decibel.ni.com/content/docs/DOC-6229

 

 

0 Kudos
Message 16 of 21
(1,015 Views)

@MaxCrunch wrote:

@jcarmody wrote:

@richard.koo wrote:

jcarmody, that would be cool.  But when I dragged it onto a blank block diagram, all I got is a text label:

http://forums.ni.com/t5/image/serverpage/image-id/84118iC87C3DA23C0B55EF/image-size/original?v=mpbl-...

What am I missing?  Thanks.



I think that's an issue with the way your browser handles dragging images.  Try saving the image to your computer and dragging it into the block diagram from there.  In Windows XP, I save snippets to my desktop then drag them onto the BD from there.


There's an issue with Firefox and, I believe, with Chrome.

 

There's a Quick Drop plugin available which is a useful workaround for this:

https://decibel.ni.com/content/docs/DOC-6229

 

 


Thanks Max, I tried with IE and it seem to work.  There is a version issue, but that's something else.

0 Kudos
Message 17 of 21
(1,001 Views)

@jcarmody wrote:

@richard.koo wrote:

jcarmody, that would be cool.  But when I dragged it onto a blank block diagram, all I got is a text label:

http://forums.ni.com/t5/image/serverpage/image-id/84118iC87C3DA23C0B55EF/image-size/original?v=mpbl-...

What am I missing?  Thanks.



I think that's an issue with the way your browser handles dragging images.  Try saving the image to your computer and dragging it into the block diagram from there.  In Windows XP, I save snippets to my desktop then drag them onto the BD from there.


Thanks, you are right that it is with Chrome.  IE seems to work, but I only have LabVIEW 10.

0 Kudos
Message 18 of 21
(999 Views)

@richard.koo wrote:

....  But somehow in my main application, the mouse never leaves.  That's what prompted me to try the multi-numeric thing.


I found out that once mouse enter fires up, the 1ms time out seem to tie up my cpu and no other events get serviced.  This actually makes all my front panel controls non-responsive.  I tried increasing the time out and at 120ms, it works.  I have a 1st gen quad core i7 Q720 1.6GHz.  My main vi is 5MB.  I have 10 event loops running before adding the event loop that services mouse scroll of 1 numeric control.  I have totally 20 numeric controls that I would like scroll capability.  Am I taxing the cpu excessively?  Anyway to optimize?  I don't mind upgrading my pc, but the target computer would be ordinary pcs and the app must work on them.

 

0 Kudos
Message 19 of 21
(993 Views)

I would suggest changing to something like this so that there aren't nearly so many event structures.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 20 of 21
(990 Views)