Recent

Author Topic: eoDropFiles option not implemented in SynEdit?  (Read 5028 times)

jetchengchu

  • Guest
eoDropFiles option not implemented in SynEdit?
« on: June 02, 2010, 09:39:27 pm »
Hi,

I'm using Lazarus v0.9.28.2 beta. 

I found that I cannot set eoDropFiles option in SynEdit to make it accept dropped files.  It seems (from the source code) that files dropping has not been implemented.

How can I do add file dropping functionality to my application, like Lazarus does?

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: eoDropFiles option not implemented in SynEdit?
« Reply #1 on: June 02, 2010, 10:44:48 pm »
You should set AllowDropFiles property of the Form to true. And write this on the form event handler to drop files:

Code: [Select]
procedure TForm1.FormDropFiles(Sender:TObject;const FileNames:array of String);
begin
  SynEdit1.Lines.LoadFromFile(Filenames[0]);
end;

I think this is enough.
« Last Edit: June 02, 2010, 10:46:36 pm by typo »

jetchengchu

  • Guest
Re: eoDropFiles option not implemented in SynEdit?
« Reply #2 on: June 02, 2010, 11:17:51 pm »
Thanks!   ::)

 

TinyPortal © 2005-2018