ohje! manchmal ist die lösung so einfach:
Delphi-Quellcode:
procedure TFormMain.TreeViewBaumDragOver(Sender: TBaseVirtualTree;
Source: TObject; Shift: TShiftState; State: TDragState; Pt: TPoint;
Mode: TDropMode; var Effect: Integer; var Accept: Boolean);
begin
Accept := true;
end;
procedure TFormMain.TreeViewBaumDragDrop(Sender: TBaseVirtualTree;
Source: TObject; DataObject: IDataObject; Formats: TFormatArray;
Shift: TShiftState; Pt: TPoint; var Effect: Integer; Mode: TDropMode);
var
WSourceNode,WTargetNodeUr : PVirtualNode;
begin
(* Eigenschaften setzen für drag and drop:
DragMode = dmAutomatic
DragType = dtVCL
*)
WSourceNode := SourceNode;
WTargetNodeUr := Sender.DropTargetNode;
TreeViewBaum.MoveTo(WSourceNode,WTargetNodeUr,amAddChildLast,false);
end;
funzt!