LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change the background color of a row in a table indicator?

Hello,
 
  How do I change the background color of a row in a table indicator? I know how to change the background color in a active cell, but that is not what I want. My first intent is to make the background color of the first row a unique color, such as green, just to highlight the top row of the table.
 
Regards,
 
Kaspar
 
 
Regards,


Kaspar
0 Kudos
Message 1 of 8
(5,227 Views)
I have done this before by using a for loop to change the active cell of a row in order to give the appearance that the whole row is turning the color at once.
Message 2 of 8
(5,226 Views)
You don't need to use a for-loop. Just use "-2" for the column index:



Message Edited by smercurio_fc on 07-31-2008 05:35 PM
Message 3 of 8
(5,211 Views)

Hello,

 

  Thanks for getting back to me, have a great day!

 

Regards,

 

Kaspar

Regards,


Kaspar
0 Kudos
Message 4 of 8
(5,192 Views)
-2, learn something new everyday!  Thanks smercurio!
Message 5 of 8
(5,171 Views)

I just wanted to add my two pence 🙂

 

After more than one hour of trying I - once again (!) - realized that the order of property nodes may make big differences. So just as a reminder: You first have to set the Active Cell and then change the color. left: bad, right: goodleft: bad, right: good

The other way round in a for loop you first change the color of let us say cell (0,0) or whatever your active cell was and after that change your active cell, what is most likely not what you want to do.


Proud developer at Hampel Software Engineering where we turn '404 not found' into '200 OK'. Join us on Discord
0 Kudos
Message 6 of 8
(3,972 Views)

@AlexElb wrote:

I just wanted to add my two pence 🙂

 

After more than one hour of trying I - once again (!) - realized that the order of property nodes may make big differences. So just as a reminder: You first have to set the Active Cell and then change the color. left: bad, right: goodleft: bad, right: good

The other way round in a for loop you first change the color of let us say cell (0,0) or whatever your active cell was and after that change your active cell, what is most likely not what you want to do.


Also remember that, by default, if accessing a property throws an error, the other property items below it are ignored.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 8
(3,962 Views)

>> [..] Just use "-2" for the column index

Learned something new today.

And yes, it's in the help. Just didn't read it at the time.

Thanks!

0 Kudos
Message 8 of 8
(3,602 Views)