LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner - insertTreeItem

Hi folks!

How can I insert new items in a tree that has 2 or more columns? In the first column, I can insert data easily, but I don´t find anything to set in order to insert other data in second column.

I am using this command to insert data:
            InsertTreeItem (parameterHandle, parameterTree, VAL_SIBLING, 0, VAL_LAST,
                description, 0, 0, position);


Thank you in advance.
0 Kudos
Message 1 of 2
(3,780 Views)

You cannot set all columns of a tree item with one call only: InsertTreeItem will insert the item in the tree and populate the first column (with index 0); after this moment you must populate the following columns one by one by using SetTreeCellAttribute (panelHandle, PANEL_TREE, rowIndex, colIndex, ATTR_LABEL_TEXT, "Some Text"); with the same command you can customize the individual cell in case the default aspect is not the one you want.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,758 Views)