TreeNode::Text

ClassName

TreeNode

AccessType

public

Name

Text

Declaration

string Text

Remark

Examples

EX1

void TreeNode_Text_ex1()
{
    Tree myTree1;
    TreeNode tn1, tn11, tn12, tnTmp;
    tn1 = myTree1.AddTextNode("abc", "node1", 1);
    tn11 = tn1.AddTextNode("def", "node11", 11);
    tn12 = tn1.AddTextNode("ghi", "node12", 12);
    out_tree(myTree1);
    /*
            myTree1
               |
            node1(abc)
           /        \
     node11(def)  node12(ghi)
    */
    
    printf("myTree1: Text = %s\n",  myTree1.Text);
    
    printf("%s: Text = %s\n",  tn1.tagName, tn1.Text);
    printf("%s: Text = %s\n",  tn11.tagName, tn11.Text);
    printf("%s: Text = %s\n",  tn12.tagName, tn12.Text);
}

Description

Property to read or write text to treenode.

header to Include

origin.h

See Also

PropertyNode::strVal, TreeNode::AddTextNode

Reference