LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How change background color of multiple cells in LabVIEw table indicator

Helllo,

I am tring to programmatically change background color of cells in labview table inidcator.

Here is sample VI I wrote

 

Any ideas?

0 Kudos
Message 1 of 9
(13,815 Views)
The Cell.BackgroundColor only applies to the active cell, not the selected cell. So, you need a loop to increment the ActiveCell and then set the color:
0 Kudos
Message 2 of 9
(13,806 Views)

Thanks. I got it working myself just after posting. New question, I am doing this inside a subvi and the table

where I am changing active cell colors is connected as an output of the the VI. The cell background color only changes in table of

subVI and not top level VI table. I tried creating VI server reference in top-level  and copying that into subvi and using that with no luck?

0 Kudos
Message 3 of 9
(13,792 Views)
You need to use a control reference. On the main VI on the block diagram create a control reference for the table control and pass the reference to the subVI. Then the subVI will be able to operate on the table control directly. There have been several examples posted on this forum. You can also search the LabVIEW Examples as there are a few in there as well. Search for "references" and open the "Property Nodes" example.
0 Kudos
Message 4 of 9
(13,782 Views)

Hi to all you.

 

I did a code like this but my table is 16 columns per 1025 rows, and it is very slow to do it like this.

 

I tried multiple parallel FOR loops, do it inside a sub VI, visible and SyncDisplay set to False.

But still too slow.

 

I need to apply about 4 colors depending of the cell values, each cell must be filled with a color.

 

 

Any suggestions?

 

0 Kudos
Message 5 of 9
(12,748 Views)

Also, if you're coloring an entire row or an entire column, you can use the value -2 for the active cell to select all of it and color it in a single call. This should appear in the help for the Active Cell property.


___________________
Try to take over the world!
Message 7 of 9
(12,730 Views)

Thanks for your replies.

 

Yesterday i started to use defer panel update but seems it didnt worked, i need to try again. I have been busy today, hope in the afternoon i can try again.

0 Kudos
Message 8 of 9
(12,707 Views)

You need to defer front panel updates on the vi the contains the table.  not the vi writing the vi server references propertiesSmiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 9
(12,699 Views)