LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you change the colors of individual cells within a 2D array?

How do you change the colors of individual cells within a 2D array of numeric indicators?
 
I want the VI to check a data value and if it is failing, white out a square at a specific index coordinate.  I have it working with color boxes, but I'm not sure how to use the property node function, to change the color of individual cells, by coordinates.
 
I have attached the VI using color boxes. If you run the VI, the box corresponding to the Step control should turn white.
 
I want to do the same thing, using numeric indicator boxes inside the array.
 
Thanks for any suggestions...
 
0 Kudos
Message 1 of 9
(3,448 Views)
Format your array into a table for display. Now you can set the color (FG and BG) of any cell as needed. 🙂
 
Message 2 of 9
(3,439 Views)
How do i do that?
0 Kudos
Message 3 of 9
(3,435 Views)

Alright, I see what you mean about a table. But, now when I try and use the CellBGColor property, to set the color, I keep getting an error.

I am assuming I just have to set the active cell using the ActiveCell property node, then wire a color box into the CellBGColor property node.

Is this correct?

0 Kudos
Message 4 of 9
(3,424 Views)
Yes it will work that way.
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 5 of 9
(3,419 Views)

Yes Sir!

Special index values are also available for the row and collumn headers as well.

-1,0 is Row "0" row header

-1, -2 Is all row headers

-2,-2 is everything!

Let me know if I flip-floped my row and column values.

Ben

Post Conflict! Andrew wins!

Message Edited by Ben on 04-04-2006 02:47 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 9
(3,416 Views)
I still keep getting an error.
 
I have attatched a copy of the VI, I am working on. I put a note where my error occurs.
 
 
0 Kudos
Message 7 of 9
(3,414 Views)

Get rid of all these sequences! That's just bad form. 😉

Your code has a few logical problems. Why do you create a boolean array if you later only look at the last element (Yes, the FOR loop does nothing useful, except in the last iteration because your outputs are not indexing. All other iterations are useless, you only get the result of the last array element. My guess is that you want to color the index white if at least one of the numbers is out if range. Right?

It is an absolute nightmare to manage all your numeric labels. Just read them from a 2D array. Now you can simply find the index of the matched elements and don't have to spend hours editing case structure conditions. 🙂

Attached is a simple example how you would do what I meant (LV7.1). Modify as needed. 🙂

Message Edited by altenbach on 04-04-2006 02:04 PM

Message 8 of 9
(3,398 Views)
0 Kudos
Message 9 of 9
(3,388 Views)