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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Add value to multicolumn tree?

Solved!
Go to solution

I have a tree with two columns.

How to add

label1/value1 to row0,col0;

label2/value2 to row0,col1;

label3/value3 ro row1,col0;

label4/value4 to row1,col1 and so on.

Looking at the tree examples InsertTreeItem() I am only able to add values/labels to col0 one after another.

 

thanks!

0 Kudos
Message 1 of 3
(2,744 Views)

Found it, to add to next column  use of SetTreeCellAttribute (panelHandle, PANEL_TREE, rowIndex, colIndex, ATTR_LABEL_TEXT, "Label1"); is used. Although I dont see any attribute to add the value to column 1 of the tree.

thanks.

0 Kudos
Message 2 of 3
(2,741 Views)
Solution
Accepted by ts_2012

Hi ts_2012,

 

Please note that InsertTreeItem sets the value of the tree item, not of the column. In CVI, columns cannot have values attached.

0 Kudos
Message 3 of 3
(2,718 Views)