11-16-2015 03:02 PM
Hello,
Once again I am fighting with tree control issues. I am trying to format a tree control to have alternating rows different colors for readability and also I need the first and last cell to have different font colors. In the attached VI the first time I run it it works fine. On subsequent runs the font colors change to black and then I am unable to change them again.
Any advice would be appreciated
Solved! Go to Solution.
11-17-2015 02:14 PM
Hey 7Ronin,
I tried opening your file and was not able to access the Initialize Sequence Tree.vi or the Tree Row Colors.vi.
11-17-2015 03:32 PM - edited 11-17-2015 03:46 PM
My apologies- attached a snippet. Hope that works.
If you simply run the VI the first time around it works fine. Running it again changes the cell text to black and no further changes to cell text color with property nodes will NOT work. I literally have to delete the tree and make a new one for the cell color change to work.
Perhaps I am missing something obvious but....
11-17-2015 03:52 PM
SubVIs are missing.
The snippet only contains top level VI.
11-17-2015 03:59 PM
Hmm,
I have not worked with the snippets before so please excuse my ignorance.... I extracted the content of the subVIs and made a new snipped below
11-18-2015 10:44 AM
11-18-2015 11:03 AM
George,
That does indeed work- thanks for the help. I am not sure why the method I was using would not accomplish the same thing, and in particular I am no clear at all as to why the cell font color changed on the second run (an seemed to stay stuck a black font) but in general the tree control seems very finicky.
Again- Thanks!
11-18-2015 01:43 PM
If you disable the last For-Loop in your code, it will work.
I don't know how NI implement Tree. But I do know that controls, like listbox, multicolumn listbox, table, and tree, don't like set cell background color.
You have to set the background color by row, not by cell.
A redraw problem.
11-19-2015 08:21 AM - edited 11-19-2015 08:22 AM
Hmm NI,
It looks like this needs to be addressed in a CAR- I lost HOURS related to trying to change the cell font color. The solution provied by Mr.Zou works as long as one wants to chage the font color for an entire row. In reality the Active Cell Font Color Property Node for the Tree controls does not function as expected (if at all).
11-20-2015 03:00 PM
7Ronin,
I will look into replicating and creating a CAR for this issue.