LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get all children of a parent in tree

I have a database set of files... each file has test results where I have read them into a tree control and sorted them by test number. 
 
What I need to know is when I select a specific file, how can I get all the tests that are in that file into an array?
 
In other words, when I select a parent object in a tree, how do I get a list in an array of all the children to the selected parent?  Is there a property or something to "get all children"? 
0 Kudos
Message 1 of 5
(8,459 Views)

Hi id,

see the attached example.

Hope it helps.
Mike

0 Kudos
Message 2 of 5
(8,440 Views)

Thanks Mike,  this helps me a lot.  I guess I first have to determine the first child by using the getchild method and then iterate using getnext method until there are no more...

Smiley Happy

0 Kudos
Message 3 of 5
(8,425 Views)
Norman Kirchners Tree API, has several (new) methods for Trees:

Add Item
Modify Item
Remove Item
Get All Items
Get Top Level Items
Get Items Parent
Get Selected Item
Get Siblings
Get Children
Get Item Properties
Check Tag Valid
Convert Tag to Text
Find Tag from Text
Outdent at Item
Indent At Item
Expand
Collapse
Empty Tree

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 5
(8,405 Views)
MikeS81,

Good example.  Also good choice of cars 🙂
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 5 of 5
(8,386 Views)