LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically change the color of an entire tree control?

Solved!
Go to solution

Any help is appreciated.

0 Kudos
Message 1 of 9
(4,623 Views)

Hi Chris,

 

which color do you want to change?

Did you try property nodes?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(4,617 Views)

Crosspost

 

Looking at the property nodes available I would have guessed it was Cell Background Color, but that is only for one cell.  You could iterate over all rows, and all columns, but this gives an error if there is no data there.  It might not be possible to do at run-time.

0 Kudos
Message 3 of 9
(4,612 Views)

You can make use of property node (Active cell background colour) but you will have to put logic to change active cell position from first row first column to last row last column.

With Regards

Miraz
Kudos is better option to thank somebody on this forum
------------------------------------------------------------------------------
0 Kudos
Message 4 of 9
(4,608 Views)
Solution
Accepted by topic author chriscarner

Use a property node.  Set the "Active Item:Row Number" to -2 (all rows).  Set the "Active Cell:Active Column Number" to -2 (all columns). Set the "Active Cell:Background Color" to the desired color.

 

"If you weren't supposed to push it, it wouldn't be a button."
Message 5 of 9
(4,599 Views)

@paul_cardinale wrote:

Use a property node.  Set the "Active Item:Row Number" to -2 (all rows).  Set the "Active Cell:Active Column Number" to -2 (all columns). Set the "Active Cell:Background Color" to the desired color.

 


New learning for me today. Thanks

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 9
(4,593 Views)

Hi Anand,

 

it's all in the help! 🙂

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(4,589 Views)

@GerdW wrote:

Hi Anand,

 

it's all in the help! 🙂


Thats my ignorance 🙂 I never read the material nor the help file unless I get stuckup somewhere. Thanks GerdW for pointing the help.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 8 of 9
(4,581 Views)

Thanks for all the quick replies, and for the answer!

0 Kudos
Message 9 of 9
(4,577 Views)