TreeNode::Show

Contents

ClassName

TreeNode

AccessType

public

Name

Show

Declaration

int Show

Remark

Show is an treenode attribute. This attribute only effect on GUI treenode (GetN Tree) to make control as show(Show is 1) or hidden(Show is 0). If one treenode no Show attribute, this treenode will be displayed as show.

Examples

void TreeNode_Show_ex1()
{
    // access Show by property
    Tree tr;                                    // declare a Tree variable
    tr.abc.Show = 1;                        // add a tree node named "abc" and set Show to 1
    int nn = tr.abc.Show;           // read Show status
    out_int("", nn);                   // should print out 1
    
    //access Show by TreeNode::SetAttribute and TreeNode::GetAttribute
    TreeNode trN = tr.AddNode("def");
    trN.SetAttribute(STR_SHOW_ATTRIB, 1); 
    
    int kk;
    if( trN.GetAttribute(STR_SHOW_ATTRIB, kk) ) // return false if Show attribute is not existed
    {
        out_int("", kk); // should print out 1
    }
    else
    {
        out_str("Error, Show attribute not exist.");
    }   
}

Description

Read or write treenode's Show status.

header to Include

origin.h

See Also

TreeNode::GetAttribute, TreeNode::SetAttribute, TreeNode::AddNode, GETN_TREE, TreeNode::Enable

Reference