Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Drag&Drop mit VirtualTreeView (https://www.delphipraxis.net/32797-drag-drop-mit-virtualtreeview.html)

Gruber_Hans_12345 28. Okt 2004 10:17

Re: Drag&Drop mit VirtualTreeView
 
Was hast du genau für ein Problem ?

Mach mal folgende Sachen (wenn nicht eh schon gemacht !)

*) DragMode auf dmAutomatic
*) Im ClipboardFormat das "Virtual Tree Data" anklicken
*) im OnDragDrop
Delphi-Quellcode:
var Node       : PVirtualNode;
    DropMode   : TVTNodeAttachMode;
begin
    Node := Sender.DropTargetNode;
    case Mode of
        dmAbove:   DropMode := amInsertBefore;
        dmOnNode:  DropMode := amInsertAfter;
        dmBelow:   DropMode := amInsertAfter;
        else       exit;
    end;
    Sender.ProcessDrop(DataObject, Node, Effect, DropMode);

Apollo13 28. Okt 2004 10:33

Re: Drag&Drop mit VirtualTreeView
 
D-A-N-K-E!!!

das ist genau des Problems Lösung!!! mit dem clipboard hab ich noch nie was angefangen...

Danke nochmal, Apollo13

Apollo13 28. Okt 2004 11:13

Re: Drag&Drop mit VirtualTreeView
 
Mist...doch noch nich ganz in ordnung: wie mach ich das mit dem copy-mode...da stürzt delphi immer ab wenn ich die kopierte Node ansehe(also die wird als untereintrag eingefügt und wenn ich beim parent der neuen node aufs plus klicke müsst ja eigentlich die neue node zu sehn sein?! kommt aber exception)...???


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:17 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz