LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

tree structure like win explorer?

Hello everybody,

I need in my program a structure like the tree structure in the windows explorer. Is is possible to program something like this in LabWindows/CVI 6.0 ?

The program have to simulate an equipment. The tree is for a better finding of the "events", the equipment can do.
The last "file" in the tree should I took to some buttons to simulate the event. But this I think is not the problem.

thx for solving my problem 😉
0 Kudos
Message 1 of 4
(3,491 Views)
There are two short answers.
1. The easiest if you have a good budget is to upgrade to CVI 7.1 and use the Tree control there. It's pretty easy to use.
2. If you're sticking with CVI 6.0, you can use the Microsoft TreeView ActiveX control. It takes more work to get it set up, but it works in 6.0. See the sample that ships with CVI: ...\CVI\samples\apps\fpeditor\fpeditor.prj. Look at all the function calls related to treeview and its nodes.
To add a treeview control to your project:
In the UI Editor, right-click on a blank spot where you want to add the tree.
Select ActiveX.
Scroll down and select Microsoft TreeViewControl, version 6.0.
Right-click on the new control and select Generate ActiveX Control Driver.
In the target .fp file box, add the absolute path to you project directory to the existing .fp file name.
Check the box to Add .fp file to project.
Click Next.
Click Advanced Options.
Click Check None.
Manually check ITreeView and ITreeViewEvents.
Click OK.
Click Next.

Now to use function panels for the ActiveX control, in a code window, goto Instrument >> Microsoft Windows Command Controls 6.0. Your best bet is to cut and paste from the fpeditor example.
0 Kudos
Message 2 of 4
(3,471 Views)
thx for your information.

but I have a little problem now:

I made an activex field in my panel, how you explored.
I made a "*.fp"-file with the sample you recommended to me.
I included the "*.fp"-file to the project.

Now the "tree structure" (the *.fp"-file) is not shown in the activex, when I started the program.
Where can I angle this?

thx for answering
0 Kudos
Message 3 of 4
(3,445 Views)
The easiest way to program a fp in cvi 6.0 is to copy an example from \CVI\samples\apps\fpeditor\... and to change desired issues. If you want to program an active X TreeViewControl basically, please compare the examples shipped with cvi 6.0 with your generated project.
However i recommend you to upgrade to CVI 7.1 because of better handling tree structures.
Following is a link where you can download evaluation version of cvi 7.1:

http://digital.ni.com/demo.nsf/websearch/531EA137A674B28786256BC100663B5C?opendocument
Message 4 of 4
(3,416 Views)