01-23-2012 06:55 AM
Hello,
I have 2 questions regarding a tree control:
1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
Any ideas?
01-23-2012 08:12 AM
Mentos wrote:
1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
Did you try a search? There's no direct way of doing this. You have to navigate the tree and build up an array. You can find an example here: http://forums.ni.com/t5/LabVIEW/get-all-children-of-a-parent-in-tree/td-p/729548
2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
No. (It's called ActiveCell, not ActiveCells) Presumably you are trying to perform an operation on multiple items. Unfortunately, you need to use a loop. You should defer panel updates if you're doing this a lot.
01-23-2012 10:34 AM
Hi Smercurio,
1) I'm performing a search at the moment. It works fine but I was hoping for a more elegant method... I guess I'll have to stay with it.
2) That's too bad.
Thanks for the tips!