LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

add multiple elements to a tree control at once

I am using a Tree Control to display customer and certificate information. However, adding 500 customer names or certificate numbers to the tree control one at a time takes for ever (well, 30000 ms). Is there any way to add multiple elements to a tree all at once, or is the only solution to use a listbox with 'forward' and 'back' buttons ?

thanks,
michael
0 Kudos
Message 1 of 2
(2,757 Views)
Hi Michael

I don’t believe there is a way to supply a list of child items to a parent item, they have to be added incrementally. One way that you could speed this process up is to design your code such that only when you expand an item does it add the child items.

If you want an even higher update rate have a look at using the ActiveX TreeView control, you will find an example called Family Tree.vi in the LV examples.

I'll do up some code that makes using both of the controls more efficient if enough people want it.
Kurt Friday
www.sciware.com.au
0 Kudos
Message 2 of 2
(2,748 Views)