I do not use the croptool very much but as far as I can tell the crop tool does not have an option for this. The best that I could come up with, is to cancel the tool if its coordinates are not over the IEBitmap.
If the tool is not within the IEBitmap with this code you have to reselect to make it visible again. Perhaps Nigel may fix this problem.
procedure TForm1.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
iX: integer;
iY: integer;
begin
iX := ImageEnView1.XScr2Bmp(X);
iY := ImageEnView1.YScr2Bmp(Y);
if ((iX <= 0) or (iX > ImageEnView1.IEBitmap.Width)) then
begin
ImageEnView1.CropToolInteraction.Cancel();
ImageEnView1.Deselect;
end
else if ((iY <= 0) or (iY > ImageEnView1.IEBitmap.Height)) then
begin
ImageEnView1.CropToolInteraction.Cancel();
ImageEnView1.Deselect;
end
else
ImageEnView1.MouseInteract := [miCropTool];
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development