01-14-2016 09:53 AM
hello everyone,
i have a 2-D array indicator, I need to display the row and column of the element that is selected with the cursor.
Any ideas?
thank you
Lorenzo
01-14-2016 10:20 AM
Hi loba,
Yes, you can use a property node with Arrelement.Value proterty selected.
I made you a code.
Regards.
01-14-2016 10:25 AM
It's kind of ugly, but it's the only way I know to do it:
01-14-2016 10:30 AM
Here another way.
01-14-2016 10:34 AM
thanks boyz. Got it!
01-14-2016 10:35 AM
Your VI returns the value, the OP asked for the indices.
01-14-2016 10:39 AM
Depending what you are trying to do, you might consider using a table instead of the array indicator (if you are using strings, you can just pipe a 2D array straight to it).
Then on the mouse up event use a property node to look at the SelStart property - this gives the row and column that was clicked.
01-14-2016 10:41 AM
If it is an indicator, may be it is better to use table, not 2D array? It has mouse click "Point to Row Column" method, relatively easy cell highlight