LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to change tag of a tree item ?

Hi,

I didn't found the way to change the tag of a tree item using CVI7 and the tree view control. Is it possible ?

Thank you
0 Kudos
Message 1 of 2
(3,109 Views)
The tag of a tree item is meant to be a unique ID of the item, and just like you cannot change the ID of a control or panel after it is created, you cannot change the tag of a tree item once it is created.

Unlike the ID of a control or panel, you can influence the value of the tag (ID) of the tree item through the TagBase parameter of InsertTreeItem().

If you just want to associate a string (that does not have to be unique with respect to the other tree items) you should set the ATTR_DATA_TYPE of the tree to VAL_STRING. Then you can set and change the string value of the tree item with SetTreeItemAttribute() with ATTR_CTRL_VAL.
Message 2 of 2
(3,109 Views)