LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Programmatically change the Text color of each cell in an array

Solved!
Go to solution

Assuming that if I have an array of 20 elements, array data type can be assumed for integer or string type ,whether it is possible to change the text color of an array at run time? 

 

The end result should be similar to this pattern : 0 to 5 elements in green, 6 to 10 elements in orange, 11 to 19 elements in Black color

0 Kudos
Message 1 of 4
(4,819 Views)
Solution
Accepted by topic author Ganesh Kumar

Elements within an array share all properties except the "value". Therefore, all elements will always have the same color of the text/background, ....

 

You can use a table instead for this purpose, but you will have some overhead in order to create the layout you want to have (coloring, distribution, 'tables work with strings, not numbers', ....)

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 4
(4,813 Views)

Thanks

0 Kudos
Message 3 of 4
(4,798 Views)

Use an array of clusters; the cluster containing two elements: A color box, and the string or number.  Size the two components the same, and put the color box in the back.  Set the background color of the string ot number to transparent.

0 Kudos
Message 4 of 4
(4,773 Views)