Showing results for 
Search instead for 
Did you mean: 

How do I get the tag of a selected line in a tree control ?

Be careful with your terminology...the Indent Level is very different from the Row of a tree control.  In LabVIEW 8.0 the "ActiveItemRowNumber" property was added, that allows you to retrieve the actual row number of a selected tag.  In other words, if your tree has 10 tags in it, regardless of their indent level and whether or not items are expanded/collapsed, those 10 tags have row values from 0-9.  Imagine the entire tree is expanded, and you click the tags one by one from top to bottom (like a listbox)...the row numbers of those tags would be 0 through 9, respectively.  This is very different from the indent level, which indicates for you the number of parents of the current item.

Hope this helps clear things up...keep in mind that the ActiveItemRowNumber is only available in LabVIEW 8.0 and later.

Message Edited by Darren on 04-07-2006 02:03 PM

Message 11 of 22
If you look at the previous posts about what he was wanting to do, he was actually looking for the column information. The customer wrote the following to demonstrate what he wanted...

      - 201

             - abc


      - 101

             - cde

             - def


Result: Tags: 201 101 Row: 2

Using the indent function here is what he needs to do.

Tyler H.

National Instruments

0 Kudos
Message 12 of 22

Hi Tyler,

Yes, I am aware of what the customer wanted to do.  The primary purpose of my post was to correct the terminology used, in the event that someone else, in the future, searched the forums for "tree" and "row" hoping to find a way to determine row numbers in the tree control.  Without my explanatory post, I'm afraid said person might be a little confused by this thread, since the term "row" was being used in place of "column".


0 Kudos
Message 13 of 22

Thankyou, Smiley Very Happy

both answers are helpful. I need the ActiveItemLevel and connect it like it is shown in the picture.


schwedeSmiley Happy



0 Kudos
Message 14 of 22
Good to know they added an active row number to LV8
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 15 of 22
Good to know they added an active row number to LV8
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 16 of 22

Yes, when we were brainstorming new features for the Tree Control in LV 8.0, the Row Number property was #1 on my list.


0 Kudos
Message 17 of 22
I have such a problem; when I use "Tree Property: Active Item:Tag or Indent level" it just gives the top-parent not childs if they're the one selected. I want to know what is the active item? If is it just the parent of any selected items? 
0 Kudos
Message 18 of 22
Oh, I didn't notice the second page! There's my answer, thank you.
0 Kudos
Message 19 of 22
Dear falkp,

I don´t understood very well your phrase:

 "You can however get the indent level by using the parent array length.  So you can mark specific indent levels."

Mainly  the parent array length. What´s this? How do I work with this function?

I need get the indent level of elements that compose a Tree Control, but I only do this into the For Loop Structure, as in the fig 1. If I try to do as in the fig. 2, I don't get the ident levels.

In the fig. 2, I build a array with the indent levels of the Tree Control, for after to insert a indent level in a determinated position of this array. This indent level references a element that I want to insert in the Tree Control.

Please, I need help in this question. I already to try all!

Very thanks,

Renato Andrade
Download All
0 Kudos
Message 20 of 22