Drag & drop from VTreeView
Posted: 18 Nov 2010, 19:44
Hello!
I would like to achieve drag and drop between VirtualTreeview and CADImportVCL. It would be rather 'simple' because i dont need any data transfer between the two component.
All i want is grab a node from VTree and pull it over cadimport, release the mouse button and make a graphic object (entity?) on the CAD drawing with the appropriate methods. So i need only the mouse X,Y coordinates when release the button over Cimportvcl...
i tried this:
But when i drag over cadimport, i get the prohibit icon so it cant 'receive' the node.
ImageCADiDragDrop is a TImage.
Thank you in advance.
Regards,
I would like to achieve drag and drop between VirtualTreeview and CADImportVCL. It would be rather 'simple' because i dont need any data transfer between the two component.
All i want is grab a node from VTree and pull it over cadimport, release the mouse button and make a graphic object (entity?) on the CAD drawing with the appropriate methods. So i need only the mouse X,Y coordinates when release the button over Cimportvcl...
i tried this:
Code: Select all
procedure TForm1.ImageCADiDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
begin
Accept := Source is TVirtualStringTree;
end;
procedure TForm1.ImageCADiDragDrop(Sender, Source: TObject; X, Y: Integer);
begin
ShowMessage('Itt engedték el: x=' + IntToStr(X) + ' y=' + IntToStr(Y));
end;
ImageCADiDragDrop is a TImage.
Thank you in advance.
Regards,