//在选中的节点中上添加1个节点
procedure TForm1.Button1Click(Sender: TObject);
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‘);
end;
end;
delphi 添加节点
时间: 2024-11-03 17:52:28