LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Precedence - Mouse Move or Cursor Move on Graph?

Since LabVIEW 8+ introduced cursor events (grab, move, release), is there a conflict that would occur between a mouse move event and cursor move event since a cursor move involves a mouse move?  Or, since the cursor move requires the left mouse button to be down, does that allow LabVIEW to differentiate which event is occurring?  I have some code I am writing to draw a box on an intensity graph (using the new plot.images property for graphs) so as to extract a region of interest.  At first, I want a cursor to follow the mouse as it moves over the graph.  Then, I want to draw the box region when I grab the cursor (with left mouse key down) and drag it.  Differentiation of these two event types will allow me to unambiguously accomplish this task.

Thanks,

Don
0 Kudos
Message 1 of 5
(3,753 Views)
Hi Don,

moving the cursor programatically will not trigger an event.
And you have the cursor grab event in LV8+

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 5
(3,738 Views)
Moving a cursor will interleave mouse move and cursor move events.
 
However, you can easily keep state of mouse up/down to distinguish what to do in this particular case. See attached draft (8.20).
0 Kudos
Message 3 of 5
(3,730 Views)
This is quite a good example.  Interleaving was the answer that I was looking for - which means there is no event precedence per se between those two event types and they take turns.  So then applying these concepts to my example results in the attached VI.  I have done something very similar with the picture control and of course one can do this with Vision functions but I always wanted to have the ability to do it straight on the intensity graph since that is a frequent container I end up using for my work.  I had devised a prior method which you saw to use cursors to draw boxes on intensity plots which will work with LabVIEW 7.1..
Message 4 of 5
(3,718 Views)
ps. So thanks again for helping me get this straight.....Don
0 Kudos
Message 5 of 5
(3,715 Views)