Enable
TreeNode
public
int Enable
Enable is an treenode attribute. This attribute only effect on GUI treenode (GetN Tree) to make control editable(Enable is 1) or disabled(Enable is 0).
void TreeNode_Enable_ex1() { // access Enable by property Tree tr; // Declare a Tree variable tr.abc.Enable = 1; // Add a tree node named "abc" and set Enable to 1 int nn = tr.abc.Enable; // Read Enable out_int("nn = ", nn); // Output: nn = 1 //access Enable by TreeNode::SetAttribute and TreeNode::GetAttribute TreeNode trN = tr.AddNode("def"); // Add a tree node named "def" trN.SetAttribute(STR_ENABLE_ATTRIB, 1); // Set Enable to 1 int kk; if( trN.GetAttribute(STR_ENABLE_ATTRIB, kk) ) // Get Enable value { out_int("kk = ", kk); // Output: kk = 1 } else { out_str("Error, Enable attribute not exist."); } }
Read or write treenode's Enable status.
origin.h
TreeNode::GetAttribute, TreeNode::SetAttribute, TreeNode::AddNode, GETN_TREE, TreeNode::Show