//在选中的节点中上添加1个节点
procedure TForm1.Button1Click(Sender: TObject);
begin
with TreeView1 do
begin
Items.AddChild(Selected,'aaa');
end;
end;
begin
with TreeView1 do
begin
Items.AddChild(Selected,'aaa');
end;
end;
//添加节点
procedure TForm1.Button1Click(Sender: TObject);
begin
with TreeView1 do
begin
Items.Add(nil,'abc');
begin
with TreeView1 do
begin
Items.Add(nil,'abc');
end;
end;
end;