From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree control ActiveItemRowNumber

Solved!
Go to solution

I created a Tree control.

I added three items

--- 12

--- 23

--- bcd

 

Then I highlight  the row containing 23, then click the Run button.

The property ActiveCellRowNumber doesn't changes. I tried all three items.

 

0 Kudos
Message 1 of 6
(2,951 Views)

Use the tree termal to read highlighted item.

Or you can use property => value.

 

ActiveItemRowNumber can be used to change text color, font, etc. without interfere with tree value.

 

 

George Zou
Message 2 of 6
(2,922 Views)

Before Reading the Active Row Number you need to provide the active Tag.

 

Tree.png

 

Check this out!!!!

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 6
(2,887 Views)

@PalanivelThiruvenkadam wrote:

Before Reading the Active Row Number you need to provide the active Tag.

 

Tree.png

 

Check this out!!!!


But if the user selects the active row, why doesn't the ActiveItemRowNumber change?

 

0 Kudos
Message 4 of 6
(2,868 Views)
Solution
Accepted by topic author njacacia

 


@njacacia wrote:


But if the user selects the active row, why doesn't the ActiveItemRowNumber change?

 


Because the user doesn't select the active row.  The user selected item becomes the value of the control.  The snippet PalanivelT provided shows you how you can get the row number for the selected value.  As zou stated, the ActiveRowNumber is really only for selecting a row to apply property changes.

0 Kudos
Message 5 of 6
(2,852 Views)

The Property of Active Row Doesn't gets triggered based on your selection, it triggers once Tag is getting activated (By Writing Tag Name).

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 6
(2,835 Views)