LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

index of selected tree control item

Hi,

I have a tree control. When I select an item from the tree control, how do I get the index of the selected item in the tree. I have tried the active item row number invoke node, but that does not seem to work.

Thank you,

-Tim
0 Kudos
Message 1 of 12
(10,829 Views)
I tried running your code but was unable to select any item in the tree.  The tree was enabled.  At first I thought it may have been related to no wait statement in the loop.  I added that, but it didn't help.  The active row number said it was #31, but nothing was selected.
Message 2 of 12
(10,816 Views)
Your tree "control" is actually an indicator....change it to a control and WAHLAH...you can select items in the tree. You have tags assigned to each item, just use the tree control output to get the value of the selected item's tag. There is no "row" number as such that I know of.



Message Edited by Bill@NGC on 08-01-2007 08:43 PM

Message 3 of 12
(10,813 Views)
Good job, Bill.  I didn't think of that one.  Most front panel items look slightly different between their "control" state and their "indicator" state.  I guess the tree control looks the same.
Message 4 of 12
(10,809 Views)
Yeah, that one looks too much the same either way. What clued me in was the icon on the block diagram....
Message 5 of 12
(10,805 Views)

This should do it

Cheers

Message 6 of 12
(10,036 Views)

Why the response to a 6 year old message thread?

0 Kudos
Message 7 of 12
(10,030 Views)

why not ?

 

Message 8 of 12
(9,992 Views)

Actually just found half my answer with this 'belated' reply.  What I would actually like to determine is the index of just the parent or 1st column selection.  Any ideas?

0 Kudos
Message 9 of 12
(9,895 Views)

Find Parent.png

This is what I came up with...

0 Kudos
Message 10 of 12
(9,888 Views)