在平常开发中,treeview的节点显示checkbox,若节点存在几级时,往往希望,选中父节点后,其子节点都要选中,如何实现勒,请看 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace SmartHo
//在选中的节点中上添加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 be