LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

I am running LabVIEW 7.1.
I want to be able to add a parent or sibling to a tree to a selected item in a tree.
0 Kudos
Message 1 of 22
(3,770 Views)
The tag of the selected item is actually the output of the tree control itself. If you create an indicator from the tree control, you will get a duplicate tree control (indicator), but if you wire the output into a string indicator, the tag of the selected item will show up. You can an item to the tree by wiring the tree reference into an invoke node, calling the method "Edit Tree Items: Add Item", and wiring the output of the tree control (which will be the tag of the selected item) into the "Parent Tag" terminal. This method will only let you add a child to an item, you cannot add a parent or sibling. Items cannot have multiple parents, so it wouldn't make sense to add a parent; and to add a sibling for the selected item, you could call the method "Navigate Tree: Get Parent" and pass the tag of the parent into the "Edit Tree Items: Add Item" method.
Robert Mortensen
Software Engineer
National Instruments
Message 2 of 22
(3,752 Views)

Hello,

i have a problem like this. I want to mark different tags in the tree and get the tags and the row. Getting the tags is quit easy (thankyou Robert). But how can i get the row?

1001

 

0 Kudos
Message 3 of 22
(3,636 Views)

Hello,

i have a problem like this. I want to mark different tags in the tree and get the tags and the row. Getting the tags is quit easy (thankyou Robert). But how can i get the row?

1001

   

0 Kudos
Message 4 of 22
(3,636 Views)

Hello,

i have a problem like this. I want to mark different tags in the tree and get the tags and the row. Getting the tags is quit easy (thankyou Robert). But how can i get the row?

1001

    

0 Kudos
Message 5 of 22
(3,637 Views)

Hello,

i have a problem like this. I want to mark different tags in the tree and get the tags and the row. Getting the tags is quit easy (thankyou Robert). But how can i get the row?

1001

      - 201

             - abc

2001

      - 101

             - cde

             - def

 

Result: Tags: 201 101 Row: 2

 

greetings schwede

     

Message Edited by Schwede on 04-06-2006 01:10 AM

0 Kudos
Message 6 of 22
(3,638 Views)

Why do you need the row? The row is not really a property of a tree structure but rather the dispalay of a tree.  Sunce branches can be compacted or expanded the row can change.  Do you really need the exact row or can yo do what you need without knowing the row.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 22
(3,628 Views)

sorry I didnt finish but hit submit.  You can however get the indent level by using the parent array length.  So you can mark specific indent levels.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 8 of 22
(3,626 Views)
Hello,
 
with the row i want to select different function for each row. Are on or more items from the first row selected the vi should start function a. Is the second row selected the vi should start function b and if the third row is selected the vi should do nothing. Where do i find your function / method??
0 Kudos
Message 9 of 22
(3,622 Views)

The way you can find the "Row" is by using the property "Active Item Properties:Indent Level." So when you get the active item, just use this property and it will give you the "Row" index. Hope that helps.

Tyler H.

National Instruments

Message 10 of 22
(3,612 Views)