LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change table cell color by using reference

Hello,

 

is there possibility to change color of one element in table by using reference.

Another words, if some element value in table is out of limits, then color of element should be changed, and other elements doesn't change color.

Reference should be used, because this will be subVI.

 

I manage to change color just for first element, but don't know how to change for example on 2., 3., element, end so on...

I know this part of code is not good, but this is just for try...

If someone can advise how to solve this.

 

element color.png

 

Thanks

0 Kudos
Message 1 of 5
(1,493 Views)

Use the Active cell property to select the desired cell, then set the color.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 5
(1,486 Views)

Here is an old example that changes the text color in a table based on value. (posted here)

 

(Note that property nodes execute top to bottom, so the order matters. If you plan to change many cells, I recommend to defer panel updates)

 

I don't understand at all why you read the table value via a value property node instead of using the terminal? seems convoluted!

 

 

altenbach_0-1666212459339.png

 

0 Kudos
Message 3 of 5
(1,432 Views)

Here's a quick draft for your code. See if you can reproduce it. 😄

 

altenbach_0-1666213321690.png

 

0 Kudos
Message 4 of 5
(1,425 Views)

As an applied example, here's how I display a correlation matrix using a color ramp:

 

Values close to 1 or -1 are getting dangerous. 😄

 

altenbach_1-1666213596952.png

 

 

Message 5 of 5
(1,421 Views)