LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding multiple items to the middle of a Tree

Hello,

How do I enter multiple items in a Tree at the same time, but not to its end? In other words, is there a way for me to specify the tag of the parent node to which the multiple items will be added? I currently use a for loop and add single items to the same parent, but that's very slow for hundreds of items.

Thank you,

Gus
0 Kudos
Message 1 of 3
(2,670 Views)

I don't have any experience with the tree control and I wouldn't be surprised if your suggestion is the only way to do this, but I can offer you one way which would likely speed it up significantly. Get a reference to the front panel and set its Defer Panel Updates property to T before the loop and to F after the loop. This will cause the display not to update while you're inside the loop.

Also, the LAVA forums has a code repository section where you should be able to find a library for working with trees which would probably be helpful.


___________________
Try to take over the world!
Message 2 of 3
(2,668 Views)
Thank you. It's really a lot faster than what I had before.

Best,

Gus
0 Kudos
Message 3 of 3
(2,641 Views)