LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change FG and BG Color of Individual Array Elements

Solved!
Go to solution

Is it possible to change the foreground and background color of individual array elements?

 

According the the link below it is not.  But that was 4 years ago and I'm wondering if it's possible with the newer version of Labview.

 

 http://forums.ni.com/ni/board/message?board.id=170&message.id=125484&query.id=927250#M125484

 

I have been unable to fidn a way to do it using Labview 8.2.1. 

 

Thanks,

 

Adam

0 Kudos
Message 1 of 6
(7,686 Views)
Unfortunately, I don't think individual elements have different color properties... If you want to indicate a particular element, you will have to use property nodes for highlighting that particular element. Alternatively create an array of LEDs along with the array you want to indicate, and use them as indicators.
0 Kudos
Message 2 of 6
(7,685 Views)
Solution
Accepted by topic author MREDAY

No, you can't.  Arrays have to share pretty much everything except the actual data value.  As was mentioned, you could use a second indicator to indicate your values of interest.  If you just want to change the BG color, you can make an array of color boxes that is behind the array of numbers.  Make the background of the numbers (and the array container transparent.  You can make it "look" like the BG of the numbers is changing.  The FG color would not be as easy.

 

Another (perhaps better) method is to use a table or listbox to display your array.  These allow you to change the colors of the cells.  You'll have to convert your array to an array of strings.  If your array is small, the hit on processing won't be significant.  But if you have REALLY big arrays, you'll notice significant time spent updating the table/listbox.

Message 3 of 6
(7,677 Views)
I like the suggestion posted above.  However, I don't see a transparency property for the array or elements?  I made a color array indicator the same size as the numeric array indicator.  And I can push the color array to the background, but the numeric array is not transparent (yet).
0 Kudos
Message 4 of 6
(7,663 Views)
When you get to the color picker, there is a T in the upper right hand corner.  That is the transparent color.  YOu will have to do it twice - once for the numeric in the array and for the array container.  Since you already have the array, you will most likely have to pull the numeric out of the array, color the array transparent, then put the numeric back in.
Message Edited by Matthew Kelton on 09-09-2009 02:07 PM
Message 5 of 6
(7,657 Views)
thanks for the help matthew.  i got it working with the color box array and transparency settings.
0 Kudos
Message 6 of 6
(7,611 Views)