Implement the DropObject event for the TextArea. Looking at my code that’s all I do. As it happens, I want the object that’s dropped, so I do something in the event handler. But I think if you do nothing, then nothing happens (i.e., no path text in the textarea). You probably have to put:
I suspect that when I was originally posting my query in 2018, I didn’t want the drop to be allowed at all. But later I wanted to be able to drop a file anywhere in this area which included a number of TextAreas. That was when I discovered I’d have to accept the drop, too.
I had the same problem with the image well, in some situations I don’t want the user replacing the image.
Trying to capture the drag event didn’t work there for me, I did figure out how to remove all the supported drag types however. Adding the below code to the Open event of the imageWell solved it. This code uses my AppKit library, but it should be translatable to others if needed.
I think this method is to be preferred: with the AcceptFileDrop call trick, albeit well suited in Michel’s case, you can’t later decide to undo that (there’s no RefuseFileDrop call in Xojo).