Reputation: 7394
How can I detect if a TDbGrid is currently in "drag mode" where a user is dragging a row (or rows) to another component.
I thought that:
if Screen.Cursor = DBGrid.DragCursor then
but that seems too brute force.
I could use the OnStartDrag and OnEndDrag events to keep track myself.
I haven't been able to find a property in TDbGrid that indicates the current mode.
Any suggestions?
Upvotes: 0
Views: 272
Reputation: 54812
You can use Dragging
function of the control:
if DBGrid1.Dragging then
Upvotes: 5