10-09-2022 06:42 AM - edited 10-09-2022 06:43 AM
在事件结构中,设置时间分支为“鼠标释放”时,有时点击鼠标,不能触发“鼠标释放”事件,在事件检查器窗口也没有该事件。
似乎与数组的“选择区域”属性设置有关。
用的是LabVIEW2020。
Solved! Go to Solution.
10-09-2022 12:44 PM
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.
Note that the LED belongs after the case structure. No need for local variables.
10-09-2022 08:42 PM
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.
10-12-2022 09:28 AM
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?
10-12-2022 03:45 PM
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.
10-12-2022 11:42 PM
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?
10-14-2022 11:45 AM - edited 10-14-2022 11:45 AM
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.
10-14-2022 10:38 PM
OK, thanks for your help and advice.