how do I prevent textdrop in a textarea? Solved

I do not want users to be able to drag text from an outside app (e.g. word processor) into a text field. How do I block it?

The docs say “Return True from this event [dragenter] to prevent the drop from occurring.” but this doesn’t work for me. In fact, I can’t even get the dropobject event to work. If I put some test code in there, it’s never executed.

Am I missing something?

Xojo 2015 r1, Mac and Windows.

Thanks

Problem solved. Apparently I have to put a me.accepttextdrop line in the open event of the textarea, even though it accepts the text by default. Then I can use a return true in the dragenter action to prevent the drop.

This works on Mac but doesn’t seem to work on Windows.