取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
11 条消息(共 21 条)
1,333 次查看

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 项奖励
12 条消息(共 21 条)
1,326 次查看

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 项奖励
13 条消息(共 21 条)
1,321 次查看

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 项奖励
14 条消息(共 21 条)
1,319 次查看

@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 项奖励
15 条消息(共 21 条)
1,307 次查看

@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 项奖励
16 条消息(共 21 条)
1,303 次查看

@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 项奖励
17 条消息(共 21 条)
1,289 次查看

@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 项奖励
18 条消息(共 21 条)
1,287 次查看

@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 项奖励
19 条消息(共 21 条)
1,281 次查看

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



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
20 条消息(共 21 条)
1,278 次查看