添加项目
TreeView1.Items.Add(nil,‘ABC‘);
删除选中的节点
TreeView1.Selected.Delete;
删除鼠标右键选中的节点
var
node1:TTreeNode;
procedure TForm1.TreeView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin
node1:=TreeView1.GetNodeAt(x,y); end; procedure TForm1.Deete1Click(Sender: TObject); begin TreeView1.Items.Delete(node1); end;
TreeView,布布扣,bubuko.com
TreeView
原文:http://www.cnblogs.com/xe2011/p/3876276.html