Use drag mode dmAutomatic.
 
In the OnMouseMove event call:
 
    BeginDrag(False, 5);
 
This will start dragging, only when the mouse has moved 5 pixels, with the mouse button still clicked.
 
That is all you need to do to get it working.
 
Stacey
-----Original Message-----
From: Robert Martin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 23 November 2000 9:30 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Drag and Drop

Hi
 
Im trying to implement drag and drop between a TDBGrid and a TTreeView.  The Treeview works great but the dmAutomatic in the TDBGrid is hopeless.  It starts dragging straight away and doesnt allow the user to select an item.  I have tried maually performing the operation (BeginDrag etc) but I believe I require the OnMouseDown event which is not visible in the TDBGrid.
 
Is there a better (simple) way of doing this.  Am I missing somthing?
 
 
Rob
Software engineer
Wild Software Ltd
[EMAIL PROTECTED]

Reply via email to