Drag and drop text into TMemo

I have tried lots of code that implements drag and drop but none work right. I'm trying to drag and drop plain text (from notepad, IE, and wordpad ) to my app's TMemo.
dc_moAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Ephraim WangoyaConnect With a Mentor Commented:

Yes you can enable Plaintext
Don't set DragMode

This will work for all browsers, IE, Chrome, Firefox and any text editor that allows you to drag text.

However, Notepad does not allow you to drag text

You can test by just creating a new project, drop in a TRichEdit on the Mainform, and run the application
Try draging and droping text into the richedit from Wordpad
0
 
Ephraim WangoyaCommented:
The easiest way to Drag and Drop text from your application to MS Word or Wordpad is to use a TRichEdit control instead of a TMemo

Using a TRichEdit, you dont have to write any code, the drag and drop is handled automatically

Otherwise you can take a look at the Drag and Drop component suite from
http://melander.dk/delphi/dragdrop/

0
 
dc_moAuthor Commented:
The easiest way to Drag and Drop text from your application to MS Word or Wordpad is to use a TRichEdit control instead of a TMemo

Can I enable plain text mode of TRichEdit and accept plain text drag and drop from notepad or wordpad? How about IE? This is what I did :

RichEdit1.PlainText := True;
RichEdit1.DragMode := dmAutomatic;
Form1.FormStyle := fsStayOnTop;

Does not work. please provide a working example.
0
 
dc_moAuthor Commented:
Works great with WordPad, Safari, but IE displays a no drag cursor icon. Why? Must be related to security?
0
 
Ephraim WangoyaCommented:

Could be, Microsoft can sometimes be choking with all these restrictions but I guess they need the security
I'm able to do it with IE though
0
All Courses

From novice to tech pro — start learning today.