LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change table background colour

Hi all,currently i'm doing a alarm triggering project. when the RMS value taken from a system , it will be saved in a table and trigger an alarm if it reach alarm value(which user can define). i have manage to create the alarm. my question is, can we automatically change the font or the line of background colour of the table where the RMS value exported has reach more than the alarm value. you can refer to the VI attached.
0 Kudos
Message 1 of 15
(3,286 Views)
Message Edited by Ravens Fan on 02-10-2010 12:26 AM
0 Kudos
Message 2 of 15
(3,277 Views)
hi Ravens Fan, may i know where can i get those functions
0 Kudos
Message 3 of 15
(3,264 Views)

Hi,

   select the property node for table and select the options active cell and cellBGcolor. 

0 Kudos
Message 4 of 15
(3,255 Views)
on activecell..
1. why when i create a constant and it can be connected.
2. how to connect a colour to the cell bg colour
0 Kudos
Message 5 of 15
(3,247 Views)
i have come to understand that the function mention is only to have the table with colour on a fix line. what i need is that if the table save a number let say more than 2, the line will be red. so any line on the table with RMS number more than 2 will have red background colour. thank you
0 Kudos
Message 6 of 15
(3,238 Views)

Hi hafizzudin,

 

you have to use a loop to check row by row. Set row's background color depending on alarm/RMS value...

 

Remember:

- for bigger tables this may be a slow process. Don't do this as often as possible and use "DeferPanelUpdates"

- read the help for that property!

 

Message Edited by GerdW on 02-10-2010 08:46 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 15
(3,225 Views)
hi GerdW, i'm sorry i cant imagine how to loop the property node to make it automatic detect about the RMS value and chnage its colour..can you show me a vi example
0 Kudos
Message 8 of 15
(3,203 Views)
You are making it much more difficult than it has to be. In your code, you have a number that you are generating. You would just do a comparison on that. No looping required. You would, however, need to know the line number of the table. That too is simple since it's a 2D array and the Array Size function will return the number of rows and columns.
0 Kudos
Message 9 of 15
(3,195 Views)
hi, it will be easy if the user knew which line that the RMS value will trigger the alarm. as an example the alarm level is at RMS=2. the line in the table that may contain number 2 or more will not be the same all the time. how can we make it automatically detect which if the line contain 2 or more, it will automatically change its colour.
0 Kudos
Message 10 of 15
(3,185 Views)