Cancel DMDropText

Support forum for our inter-application drag-n-drop components.

Cancel DMDropText

Postby w2m » Mon Nov 17, 2014 6:50 pm

If an exception occurs in a threaded procedure that is run from within the DMTextTarget1Drop event how do you cancel the drop so the cursor changes back to crDefault and the DMTextTarget1Drop event is cancelled. Also in general how to you cancel a drop?
Posts: 2
Sat Sep 13, 2014 10:09 am

Re: Cancel DMDropText

Postby DropMaster » Mon Nov 17, 2014 9:22 pm

Once you're in the OnDrop handler, the drop has effectively already happened so there's no concept of canceling. You can decide to catch the exception and do nothing, I suppose. But you can't let an exception escape and mess up the drag and drop loop.

Canceling is the province of the source side. To "cancel" on the target side, you can e.g. change the AcceptTextFormats property to stop accepting things when you don't want them. This can be done dynamically during the drag.

Hope this helps.
DropMaster Support
Posts: 24
Fri Apr 15, 2011 6:32 am

Return to DropMaster

Who is online

Users browsing this forum: No registered users and 1 guest