LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the index of framed color box control in 2 D framed color box array

Solved!
Go to solution

Hi,

 

In project, I want to show the different status (Std By, TIP, Pass & Fail) with different color for 200 color boxes arranged in 20X10 (2 D array). When user click on any of the array item, I want to show the details, so I want the index of the item. How can I get it?

 

Thanks,

Shrinivas

0 Kudos
Message 1 of 8
(2,731 Views)

Why an array? There's more than one way to skin a cat Smiley Very Happy

 

See attached

 

Message 3 of 8
(2,680 Views)

Thanks RavensFan, this is what I exactly want. I've already tried getting index using coordinates. But it is not generalised. I've hard coded the size of element and XY position of first element.

 

Thanks Jiddu Krishnamurti, I'll check the possibility of using table control. I've LV 2010. Can you save your VI to LV 2010 and attach it?

0 Kudos
Message 4 of 8
(2,634 Views)

If you want to use a 2D array (any type of elements!) you can use something similar to what I used in the 4x4 tic tac toe game posted here. All you need to do is adjust one cluster diagram constant according to the size of the array elements.

0 Kudos
Message 5 of 8
(2,626 Views)

Thanks altenbach, I got the idea from the VI.

0 Kudos
Message 6 of 8
(2,618 Views)

2010 Version attached 

0 Kudos
Message 7 of 8
(2,577 Views)

Thanks...

0 Kudos
Message 8 of 8
(2,560 Views)