LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Index

Solved!
Go to solution

Is there a way to show the index values next to a array control? So I can keep track of which element I'm putting values into. 

0 Kudos
Message 1 of 7
(3,061 Views)

Right Click >> Visible Items >> Index Display

0 Kudos
Message 2 of 7
(3,054 Views)

I saw that as well which will work for me. But I was wondering if they had a way if you expand the array and it shows the index values next to all the elements shown.

0 Kudos
Message 3 of 7
(3,050 Views)
Solution
Accepted by topic author NickBl

No, you would have to add that yourself. Each index display represents a dimension of the array, so you cannot have one for each element. But you could put another array right next to yours with values 0 to N. You can have it scroll with your original array if you use an event structure with some property nodes.

0 Kudos
Message 4 of 7
(3,041 Views)

okay, thank you.

0 Kudos
Message 5 of 7
(3,034 Views)
Solution
Accepted by topic author NickBl

@Gregory wrote:

You can have it scroll with your original array if you use an event structure with some property nodes.


If you don't like herding cats, create an array where each element is a cluster of an index and a value. Make the array a control so it can be operated, but make the index element disabled so it can only be change programmatically. (you can even color it darker, so it looks more like an indicator). Now they are guaranteed to scroll together, no code needed.

 

Now you would just index into that array and unbundle the value. You would also rewrite the cluster whenever the array size changes, but that still seems simpler. 😄 

 

Message 6 of 7
(2,989 Views)

Thanks!

0 Kudos
Message 7 of 7
(2,926 Views)