TreeViewNodeClear

 

Delete all child nodes from the Treeview object.

 

void @TreeViewNodeClear(string classname);

 

Parameters

string classname : The class name of the object

 

Return Value

None

 

Example

@TreeViewNodeClear("TreeView1");

im = @ImageListNew();
@ImageListSetSize(im, 32, 32);
@ImageListAdd(im, "Folder.png");
@ImageListAdd(im, "Module.png");
@TreeViewSetImageList("TreeView1", im);

node = @TreeNodeNew("Floor1", 0, 0);
child = @TreeNodeNew("Office1", 1, 1);
@TreeNodeAdd(node, child);
child = @TreeNodeNew("Office2", 1, 1);
@TreeNodeAdd(node, child);
child = @TreeNodeNew("Office3", 1, 1);
@TreeNodeAdd(node, child);
@TreeViewNodeAdd("TreeView1", node);

node = @TreeNodeNew("Floor2", 0, 0);
child = @TreeNodeNew("Office4", 1, 1);
@TreeNodeAdd(node, child);
child = @TreeNodeNew("Office5", 1, 1);
@TreeNodeAdd(node, child);
child = @TreeNodeNew("Office6", 1, 1);
@TreeNodeAdd(node, child);
@TreeViewNodeAdd("TreeView1", node);

@TreeViewExpandAll("TreeView1");

 

Description : Add Floor1 and Floor2 nodes to the TreeView1 object, and add Office1, Office2, Office3 and Office4, Office5, and Office6 as their child nodes respectively.

 

Version Information

Supported Version: 10.3.3

 

Related Helps

@TreeNodeAdd()

@TreeNodeGetFullPath()

@TreeNodeGetText()

@TreeNodeNew()

@TreeViewExpandAll()

@TreeViewGetSelectedNode()

@TreeViewNodeAdd()

@TreeViewNodeClear()

@TreeViewSeekNode()

@TreeViewSetImageList()

@TreeViewSetSelectedNode()