Author: Lou Adler Move items in TreeView by drag&drop method Answer: 1 2 procedure TfrmMain.TreeView1DragOver(Sender, Source: TObject; X, Y: Integer; 3 State: TDragState; var Accept: Boolean); 4 begin 5 if TreeView1.Selected.Level = 0 then 6 Accept := False; 7 end; 8 9 procedure TfrmMain.TreeView1DragDrop(Sender, Source: TObject; X, Y: Integer); 10 begin 11 if TreeView1.GetNodeAt(x, y).Level = 1 then 12 TreeView1.Items.Add(TreeView1.GetNodeAt(x, y), TreeView1.Selected.Text) 13 else 14 TreeView1.Items.AddChild(TreeView1.GetNodeAt(x, y), TreeView1.Selected.Text); 15 TreeView1.Selected.Delete; 16 TreeView1.AlphaSort; 17 end; 18 19 end.