09-03-2009 01:50 AM
Hi All,
I want to use .net treeview control in my application. In treeview, I want to show the test carried out. Each test will have a child nodes indicating the steps involed in the test. I want to know that how I can add child nodes to treeview.
Thnaks.
Shrinivas
Solved! Go to Solution.
09-03-2009 02:56 AM
Why don't you use LabVIEWs Tree Control, there are many examples available.
Christian
09-03-2009 03:03 AM
Thanks for reply.
In .net treeview control you can have check boxes directly to node & we check which nodes are selected. But in labview we need to assign image for check box, also it requires different images for checked & unchecked check box.
Thanks,
Shrinivas
09-03-2009 06:50 AM
It's possible to set custom Icons as we discussed in one of you other threads about this topic.
here > http://forums.ni.com/ni/board/message?board.id=170&message.id=437987#M437987
09-03-2009 12:37 PM
I don't think that will accomplish what the user is trying to do. If I understand correctly, I think the user wants to be able to check/uncheck boxes?
As far as the .NET Treeview control, like any other .NET control you need to place it inside a .NET container. Examples ship with LabVIEW on using .NET with LabVIEW. You should also read the section in the LabVIEW Help on how to use .NET in LabVIEW. As for the control itself, you need to look to MSDN for the documentation since it's a Microsoft control.
Attached is a simple demo to get you started. Note that in a real program you should be properly closing references and handling errors.
09-05-2009 12:28 AM
Thanks. I'll try the demo example.
Shrini.
09-05-2009 05:09 AM
09-05-2009 08:49 AM
09-06-2009 11:48 PM
Hi,
I've added tree nodes with Keys, but my problem is how to get Key of selected node.
e.g. Following is my tree
A 1
AA 11
AAA 12
AAAA 13
B 2
BB 22
BBB 23
When I click on AAA 12 node; I should get Text as AAA & Key as 12. Right now I'm getting only AAA. In .net we can get this by Tag Property. Here Tag property is there, but it is not a string.
Thanks & Regards,
Shrinivas
09-07-2009 08:48 AM