LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree Control Value Array can contain any string

I am working on an application with a tree control, where I want to filter items and only display matching items in the tree. My first pass solution was to collapse the height of unmatched items, as this allowed me to retain the tree value while filtering. However, the result looked bad. While refactoring, I decided to rebuild the tree while filtering, and this required me to keep track of the tree value. What I discovered was that if you have a tree where more than one item can be selected, the value array is an array of tree tag strings. Fortunately, if there are sating values that don't match any displayed tree item, those are ignored. (I was expecting an error.)

 

This opens the possibility of storing any information in the tree value, including its state information in my case. I created a functional global to hold the state of the tree, but this probably wasn't necessary.

 

Thoughts on this behavior?

 

table value.pngtable value2.png

 

Note that empty strings and random stuff can be stored to the value. Here items 1 and 3 are actual tree item tags.

0 Kudos
Message 1 of 2
(445 Views)

I would rather use tags to store info.

tt.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 2
(411 Views)