title: I'm looking for an example of Drag-and-Drop for Delphi Firemonkey
body: <p>I did find one at the end of:</p>
  
  <p><a href="https://forums.embarcadero.com/thread.jspa?messageID=447850" rel="nofollow">https://forums.embarcadero.com/thread.jspa?messageID=447850</a></p>
  
  <pre><code>unit Unit1;
  
  interface
  
  uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Platform;
  
  type
  TForm1 = class(TForm)
  Panel1: TPanel;
  procedure DragDrop(const Data: TDragObject; const Point: TPointF);override;
  procedure DragOver(const Data: TDragObject; const Point: TPointF; var Accept: Boolean);override;
  private
  { Private declarations }
  public
  { Public declarations }
  end;
  
  var
  Form1: TForm1;
  
  implementation
  
  {$R *.fmx}
  
  procedure TForm1.DragDrop(const Data: TDragObject; const Point: TPointF);
  var P: TPointF;
  begin
  P:= Platform.ScreenToClient(Form1,Point);
  TPanel(Data.Source).Position.X:=P.X - TPanel(Data.Source).Width/2;
  TPanel(Data.Source).Position.Y:=P.Y - TPanel(Data.Source).Height/2;
  
  end;
  
  procedure TForm1.DragOver(const Data: TDragObject; const Point: TPointF; var Accept: Boolean);
  begin
  Accept:=true;
  end;
  
  end.
  </code></pre>
  
  <p>but it doesn't want to compile. The Platform identifier is undeclared which is not surprising, since it doesn't appear anywhere else in the code.</p>
  
  <p>Also, TPointF and TForm1 are incompatible types. This also doesn't surprise me.</p>
  
  <p>The trouble is, I don't know how to fix either of these problems.</p>
  
  <p>I don't know what the type of Platform should be. When I guessed TPlatform I noticed that it is merely an enum with not ScreenToClient method.</p>
  
  <p>The second problem has me completely baffled. How can the compiler know the parameter types of a method on an instance whose class it can't identify because the instance is undeclared?</p>
  
  <p>edit:</p>
  
  <p>Sorry, I should have been clearer about my requirements. I am trying to build a mobile app that will show users images of products, and allow the user to drag images one at a time into a 'comparison' area. Then the user clicks a compare button and we go to a new screen that compares the products whose images the user has dragged and dropped.</p>
  
  <p>So really, what I'm looking for is a screen with two components on it. One of the components is draggable, and the other is the target. I need to be able to recognize that the drag-and-drop has occurred and the identity of the draggee...</p>