NI LabVIEW,CVI,数据采集等产品讨论区

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

“鼠标释放”事件检测的bug

已解决!
转到解答

在事件结构中,设置时间分支为“鼠标释放”时,有时点击鼠标,不能触发“鼠标释放”事件,在事件检查器窗口也没有该事件。

似乎与数组的“选择区域”属性设置有关。

用的是LabVIEW2020。

下载全部
0 项奖励
1 条消息(共 8 条)
2,311 次查看

If you move the mouse outside the control while it is pressed, the mouse release on "A" is no longer possible. Maybe you could use a mouse leave event to substitute in that case.

 

 

altenbach_0-1665337432801.png

 

 

Note that the LED belongs after the case structure. No need for local variables.

 

0 项奖励
2 条消息(共 8 条)
2,278 次查看

Thanks for your answer altenbach. But I tested your program and found that there is still this problem. Attached is the video of the test. During the test, the mouse was held in the air, and the mouse pointer remained on the array and did not move. Please check. Thank you.

0 项奖励
3 条消息(共 8 条)
2,257 次查看
解答
已被主题作者 whchrome 接受

Thanks for he clarification. Now that you show what to look for, I do see the problem very occasionally.

 

(My suggestion addressed a very specific problem, but this seems to be different.)

 

I am not sure where the problem is, it could even be in the mouse driver or OS. Maybe we just need to find a better solution. Can you explain the purpose of what you are trying to do?

0 项奖励
4 条消息(共 8 条)
2,189 次查看

I agree that it looks like a bug that the Mouse Up events aren't firing. I have filed Bug 2182259 on the issue.to LabVIEW R&D.

5 条消息(共 8 条)
2,173 次查看

Thanks for your help, altenbach. I ran into this bug when trying to select some elements in an array with the mouse. Sometimes you need to use the mouse to press and release to select a subset of the array, and sometimes you need to click to select one element. The bug is sometimes triggered when clicking to select one element, i.e. the program is still selecting after the mouse is released. Attached is the original vi. Do you have a better solution?

0 项奖励
6 条消息(共 8 条)
2,149 次查看

Yes, this is obviously a bug and I was not able to reliably program around it.

 

I took the liberty to simplify your code a little but (no change in functionality, bug still occurs!) to show how to make things simpler and better.

 

altenbach_1-1665765855932.png

 

 

 

 

0 项奖励
7 条消息(共 8 条)
2,124 次查看

OK, thanks for your help and advice.

0 项奖励
8 条消息(共 8 条)
2,113 次查看