给一段代码给一个treeview加节点;
root:=TreeView1.Items.Add(nil,"Root Node");
FirstLevel1:=TreeView1.Items.AddChild(root,'The First Node of First Level');
FirstLevel2:=TreeView1.Items.AddChild(root,'The Second Node of First Level');
FirstLevel3:=TreeView1.Items.Add(FirstLevel1,'The Third Node of First Level ');
SecondLevel:=TreeView1.Items.AddChild(FirstLevel1,'The First Node of Second Level');
如果没错的话这个树是这样的
Root Node(root)
The First Node of First Level(FirstLevel1)
The First Node of Second Level(SecondLevel)
The Second Node of First Level(FirstLevel2)
The Third Node of First Level (FirstLevel3)