Droping text file into DBMemo not taken as an "edit". lazarus / 31-LCL ---------------------------------------------------------------------- Elmug · 2012-08-19 02:24 When I drop a text file into a DBMemo, I set at the code for it a DBMemo1.SetFocus. When I exit the DBMemo by mouse, the text is lost, as if editing had not taken place. My work around is to type a space over any space of the dropped text, then the text becomes "edited" and the rest is fine. I'd say, though, that dropping text by dropping a file should be consider as any other editing. Hope this, if verified, be addressed by the team. NOTE: SetFocus or not, makes no difference. Clicking on the loaded text of the memo is no edit, of course. But since the memo field was empty, to begin with, this should be an "edit". Thanks. ---------------------------------------------------------------------- Dick, from the internet · 2012-08-19 15:29 after dropping the text, try setting   dbMemo1.Modified := True; ---------------------------------------------------------------------- Elmug · 2012-08-19 17:30 Quote from: geno on August 19, 2012, 05:29:53 pmafter dropping the text, try setting   dbMemo1.Modified := True; Good tip, Geno. I'll try it out. Thanks. ---------------------------------------------------------------------- Elmug · 2012-08-20 01:57 Geno, Sorry I could not get this to work. There's also something I noticed: Dropping a file into the DBMemo box does not give the focus to my application. The focus still remains in the Windows' folder window. So, even if I give focus to the DBMemo box, I still have to click into it to do the redundant editing mentioned above. I think dropping a file to the application should bring the focus to the application. ---------------------------------------------------------------------- MacWomble · 2018-08-13 17:25 Is there a solution for this issue? I got the same problem when inserting from clipboard. ---------------------------------------------------------------------- Thaddy · 2018-08-13 20:11 In the control's OnDragOver event set the focus and the edit mode. You can also possibly set it in the OnDropFiles event. ---------------------------------------------------------------------- Thaddy · 2018-08-13 20:12 Quote from: geno on August 19, 2012, 05:29:53 pmafter dropping the text, try setting   dbMemo1.Modified := True; *before* dropping... you were close!