11-15-2009 08:52 AM
Hi,
I'm new to LabVIEW and any help will be appreciated.
I would like to create VI with a tree control which receives an array of tests, displays this array as tree and returns an array of tests selected by user.
The input array is as following:
Module1 Test1
Module1 Test2
Module1 Test3
Module2 Test4
Module2 Test5
...
The tree should be as below:
+ Module1
Test1
Test2
Test3
+ Module2
Test4
Test5
A user may select more than 1 test (using a mouse + Ctrl or Shift).
If a user selects a module (expanded or not expanded), then all tests of this module are selected (it's not must, but nice to have option).
For example, a user selected Module1->Test1 and the whole Module2. The output array should be as following:
Module1 Test1
Module2 Test4
Module2 Test5
Can anyone please give an example of how to do this.
Thanks in advance.
11-15-2009 09:19 AM - edited 11-15-2009 09:20 AM
For setting up the Tree you have to use property nodes and invoke nodes. This can become a bit tricky. Selecting mode for items can be configured in the context menu. For start see example VI.
For the desired extended you need to check whether a parent item or all child items are selected. To start this process you can detect the events generated by the Tree control. Tip: use the child tags to detect which element belong to which group. But the rest will be your job.
Example is in LV 8.6
11-16-2009 03:26 AM
03-24-2011 11:08 AM
Hi,
If I wanted to create a tree control from a 2D array of strings containing data such as:
parent1 child 1
parent1 child 2
parent1 child 3
parent2 child 1
parent2 child 2
parent2 child 3
etc...
I basically have over 500 "child" entries and about 20 different "parent" entries I will be getting the list from a sql server and bringing it into LV as a 2D string array, is there a way to take this array and convert it into a tree control?
Thanks In advance
03-24-2011 09:58 PM
Well, I believe that I may have solved my own problem. If interested, here is an example of what I did.
03-24-2011 10:42 PM
The vi will run properyly provided the size of the "ParentColumn" and the "#ChildperParent" array are same... or else you may end up with some issues
06-21-2011 07:32 PM
I have a similar problem which has been bugging me for several days.. It will be greatly appreciated if you can re-post the example in Labview 8.5. Thanks
06-22-2011 06:09 PM
Here's that example in 8.5: