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.

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,700 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,694 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,689 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,685 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,676 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,670 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,666 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,658 Views)

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

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