I think I found the cause of the thumbnails scrolling until the thumbnails are dropped.
procedure TImageEnMView.IEEndDrag;
begin
EndDrag(true);
fDragging := false;
TerminateDragScrollTimer;
end;
// End automatic scrolling when dragging completes
procedure TImageEnMView.TerminateDragScrollTimer;
begin
if assigned(FDragScrollTimer) then
FDragScrollTimer.Enabled := False;
end;
TerminateDragScrollTimer is not called until IEEndDrag is called.
IEEndDrag is not called in the application I am working with until the user responds to a question, so the thumbnails continue to scroll until the top of the list is reached or the user answers the question and IEEndDrag is called.
ImageEnView code should be changed call TerminateDragScrollTimer when the mouse or a touch drag leaves the component because IEEndDrag can not be called until the mouse or a finger (touch) is at best over the sender component. As a result, the thumbnails keep scrolling even after the mouse leaves TImageEnMView.
IEEndDrag can not be called in the ImageEnMView.OnMouseLeave event in the project because that will immediately stop the drop and no drop occurs.
In any event, the real source of the problem is that the thumbnails continue to scroll until IEEndDrag is called. The thumbnails should not scroll at all after the mouse or finger (Touch) leaves TImageEnMView.
There is no OnMouseLeave event that I can find in the source code, but if there was, it is possible that if TerminateDragScrollTimer was called in this internal event, the problem may be resolved.
I also found that if DragMode is set to dmAutomatic, thumbnails can not be selected at all!!!!
procedure TForm1.DragMode1Click(Sender: TObject);
begin
if DragMode1.Checked then
begin
ImageEnMView1.DragMode := dmAutomatic;
DragMode1.Caption := 'Manual';
This prevents selecting any thumbnail at all.
end
else
begin
ImageEnMView1.DragMode := dmManual;
DragMode1.Caption := 'Automatic';
end;
end;
This has been driving me nuts for at least 2 days so I hope a fix can be implemented fairly quickly. A demo that demonstrates the autoscrolling and dmAutomatic problem can be downloaded here:
attach/w2m/20141222142257_ImageEnViewTouchDD.zip
120.38 KB
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development