Hi
The whole code would be something like:
procedure TMDIChild.ImageEnView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
sel: TIERectangle;
begin
if ImageEnView1.Selected and
( ImageEnView1.XScr2Bmp( X ) > ImageEnView1.SelX1 ) and
( ImageEnView1.YScr2Bmp( Y ) > ImageEnView1.SelY1 ) and
( ImageEnView1.XScr2Bmp( X ) < ImageEnView1.SelX2 ) and
( ImageEnView1.YScr2Bmp( Y ) < ImageEnView1.SelY2 ) then
begin
sel := ImageEnView1.SelectedRect;
ImageEnView1.VisibleBitmapRect := Rect( sel.x, sel.y, sel.x + sel.width, sel.y + sel.height );
end;
end;
Also, there is a MouseInteract items that performs a similar function: miSelectZoom.
Nigel
Xequte Software
www.imageen.com