From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-27-2017 03:12 AM
Hi
I am making an alarm system with alarms continiously appearing in a table. These alarms are color coded, so i use the cellBGcolor property node to activate the cell colors. The problem is: I insert a row on top of the table for each iteration of an alarm. The text is pushed down a row, but the colors inserted in the last iteration do not follow... how can i solve this? I have som theories, but want to ask if there is a easy fix i havent thought about that may help me?
Solved! Go to Solution.
03-27-2017 03:12 AM
image of the actual loop
03-27-2017 08:28 AM
Magnhel90 wrote:The problem is: I insert a row on top of the table for each iteration of an alarm. The text is pushed down a row, but the colors inserted in the last iteration do not follow... how can i solve this?
I can't open your vi right now, please convert to 2015.
Regarding your screenshot: Have you tried a third sequence case for re-coloring?
03-27-2017 08:50 AM
Can you open this one?
Have tried a third sequence, it still did not move the BGcolors
03-27-2017 10:14 AM - edited 03-27-2017 10:20 AM
Your code is doing exactly what you said it should do. You said with every change of value on H or HH you set the row 0 column 0, 1, and 2 colors. Then when the value changes again you change those colors again. But when you insert a new row the colors don't get shifted down. You need to color every row every time. By the way an easier way to do this is by setting the column to -2 which sets the whole row active, then you only need to call the function once.
An alternative that is easier is to insert new events at the bottom, and auto scroll down. Then you paint the newly inserted row color, and leave all the other rows alone.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-27-2017 10:23 AM
Attached is an updated version which keeps track of the row colors that are added, then colors them all one at a time every iteration. Like I said I prefer the other method of adding new rows at the end because you only have to color one new row each time instead of having to color all of them every time.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-27-2017 10:25 AM
@Magnhel90 wrote:
Can you open this one?
yes,thanks
Have tried a third sequence, it still did not move the BGcolors
I see, as far as I know, that's the expected conduct of the table control.
You could use an 1d array of clusters, each cluster containing a color-box and a string ...
08-09-2018 07:56 AM
When you set the Active Cell using a property node, specify the row and column to make active. After doing that the next call to set something like the Cell Color Background, will be applied to the cell you specified. If the row is -2 it means all rows for that column. If row and column are -2 then it means all cells. Also in the future do searching on this issue (it has to be on the forums somewhere) and if nothing comes up make your own new thread asking the question. This thread has been marked with a solution as the original problem has been solved.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord