Nigel,
I am going crazy again over dragging a thumbnail from TImageEnMView to TImageEnVect when TImageEnMView.Gestures.Pan.Enabled := True with touch.
If panning is enabled there is no drag. I have DragMode set to manual. If you disable panning the touch drag functions. Here is my code. I think this needs to be improved a little more or I am forgetting something.
Maybe when IEBeginDrag is called the panning should be turned off and restored after a drop...
As it stands, you can either have panning without touch drag and drop or touch drag and drop without panning. Drag and drop in combination with panning functions as you would expect with the mouse.
procedure TForm1.FormCreate(Sender: TObject);
{ Initialize. }
begin
ImageEnMView1.Gestures.Pan.Enabled := True;
ImageEnMView1.DragMode := dmManual;
end;
procedure TForm1.ImageEnMView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
{ Start the drag. }
begin
ImageEnMView1.Cursor := crDrag;
ImageEnMView1.IEBeginDrag(True);
end;
procedure TForm1.ImageEnVect1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
{ Accept images dropped from TImageEnMView. }
begin
if Source is TImageEnMView then
Accept := True;
end;
procedure TForm1.ImageEnVect1DragDrop(Sender, Source: TObject; X, Y: Integer);
{ Respond to Drag and Drop. }
begin
{ Drop an object into a layer }
if Source is TImageEnMView then
begin
end;
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development