LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse Event Over an Array Element

For example, I have an array of string control : {A, B, C, D} and a string indicator.  When I move my mouse over element in the array, say element C, I would like to print out index 2 "C" to the string indicator.  Is there a way to do that for any arbitrary element?  Thanks

0 Kudos
Message 1 of 3
(3,698 Views)

You can register for the Mouse Move event.

 

When this event is triggered the exact location of the mouse is provided by LabVIEW, in this VI you can placing a utility VI from the LAVA repository located here.

 

Here's a screenshot of code using this VI (this example is for a mouse down):

MouseDown.png

 

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 3
(3,682 Views)

This will need to be done in a brute force method.

 

20675iEAA23ECD610467C5

 

The snippet above are the properties of the array you will need.  Adding element bounds to element position (vert or horz depending on how you display the array) will allow you to calculate the area on the FP where each element physically resides.  You need the top left index to determine the index currently displayed in each elelment location.

 

Then its just a matter of reading the mouse position in the mouse move event case and deciding if it moved over an element get the index and display the value.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(3,677 Views)