The MultiView2 demo uses a ImageEnMView with its alignment property (vertically aligned) set to alLeft with a GridWidth property set to 1 (one column). To display a horizontally aligned ImageEnMView set the ImageEnMView Align property to alTop or alBottom (horizontal) and the GridWidth property to 0 (one row).
// Accepts drag/drop. Draws a line to signal where to insert images
procedure TMainForm.ImageEnMView1DragOver(Sender, Source: TObject;
X, Y: Integer; State: TDragState; var Accept: Boolean);
var
im: Integer;
imgX, imgY: Integer;
begin
if Source = ImageEnMView1 then
begin
Accept := true;
im := ImageEnMView1.InsertingPoint(X, Y);
imgX := ImageEnMView1.ImageX[im];
imgY := ImageEnMView1.ImageY[im];
ImageEnMView1.Paint;
with ImageEnMView1.GetCanvas do
begin
Pen.Color := clRed;
Pen.Style := psDot; // display a dotted line
Pen.Width := 1; // a dotted line only works if pen width is 1 otherwise it will be a solid line
// draw the line vertically at the insert point
MoveTo(imgX, imgY);
LineTo(imgX, imgY + ImageEnMView1.ThumbHeight - 10);
end;
end;
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development