Win7 64bit, laz 2.0.12, FPC 3.2.0
I need to be able to drag text from another app (browser or text-editor) and drop it on a TEdit (clipbord is used for other stuff, so copy/paste is not a solution).
And actually, I figured, why not create the thing as a componemt, so it can be used in other applications as well...?
So - a Form with a TEdit.
Nothing else for a start.
Plan was to use Melanders (DragDropLazarus 5.2.0.0 Installed from online - and demos functioning. Unfortunately, there are no demo of using DragTextTarget...)
Creating a OnDragOver handler for the TEdit.
procedure TForm1.Edit1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
Accept := true;
end;
Running the app, it is never called. Neither in Debug nor normal mode.
Added a TDropTextTarget and set TEdit1 as Target.
That raises an exception (Compiles fine, but gies a runtime esception):
TEdit can't have a control of class TWinControlProxy as a child
So what am I missing?