dc_mo
asked on
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.
ASKER
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works great with WordPad, Safari, but IE displays a no drag cursor icon. Why? Must be related to security?
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
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/