tree_set_attribute_to_all_nodes
Description
set the attributes to all nodes in the given tree
Syntax
void tree_set_attribute_to_all_nodes( TreeNode & tr, LPCSTR lpcszAttrib, LPCSTR lpcszAttribVal, bool b1stLevelChildrenOnly = false, bool bBranchOnly = false )
Parameters
- tr
- [modify]root tree node to set attributes
- lpcszAttrib
- [input]name of attribute to set
- lpcszAttribVal
- [input]value of attribute to set
- b1stLevelChildrenOnly
- [input]true will set only the immediate children,
- false will set current node as well as all child nodes recursively
- bBranchOnly
- [input] true will set only branch tree node, false will set all tree node
Return
Examples
EX1
void tree_set_attribute_to_all_nodes_ex1()
{
Tree tr;
TreeNode trFirst = tr.AddNode("First");
TreeNode trSecond = tr.AddNode("Second");
out_tree(tr);
tree_set_attribute_to_all_nodes(tr, STR_LABEL_ATTRIB, "All Node Labels");
out_tree(tr);
}
Remark
See Also
tree_remove_attribute
header to Include
origin.h
Reference