LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if one item in the tree is highlighted


turbot wrote:

>You also seem to be mixing and matching operations. The code I showed you was supposed to go into the callback VI, not the main VI,

 May I know which one is the call back vi.


The callback VI is the VI that is wired to the event registration. That VI gets automatically called whenever a node is clicked on the tree control. That's how the example works. You may want to spend some time with the documentation on event registration for ActiveX controls, as well as the documentation on the TreeView control. 

 


turbot wrote:

>as my understanding was that you wanted to get an update whenever the user clicked on the tree control. As it is, you have the code in the main VI, so what is the callback VI doing now?

What need to do is when someone click on one item in the tree and click another 'add' button, the highlighted item will be add into another list. Incase he click the 'add' button without highlight any items in the tree, I need to give a waarning. 


 OK... Now you're asking for something completely different. The "Family Tree" example that ships with LabVIEW seems to be what you based your VI on, given that your code looks exactly like it, and you're even using subVIs from that example. In that example a string indicator is updated when the user clicks on a node via a callback VI. The Add button event handler adds an item to the tree. Well, the "Selected Item" indicator is right there. If no node is selected then that string is empty. So what do you need to do beyond just checking if that string is empty?
Message Edited by smercurio_fc on 10-07-2008 09:01 AM
0 Kudos
Message 11 of 11
(314 Views)