Hello
How do I clear the contents of a Paintbox, since the component I'm working on a preview to printing on dot-matrix, every time I change the contents of the paintbox page is a letter on top of another:
follows the code that loads the pages:
Hoja : TlmfImage; da unit LMF (Lazarus Metafile)
procedure TPrintPreview.ShowerPaint(Sender: TObject);
var
Rect : TRect;
begin
if DontDraw then
begin
Shower.Width := Round(Hoja.Width*FZoom/100)+10;
Shower.Height := Round(Hoja.Height*FZoom/100)+10;
DontDraw := False;
Exit;
end;
Rect.Left := 10;
Rect.Top := 10;
Rect.Right := Round(Hoja.Width*FZoom/100);
Rect.Bottom := Round(Hoja.Height*FZoom/100);
Shower.Width := Round(Hoja.Width*FZoom/100)+10;
Shower.Height := Round(Hoja.Height*FZoom/100)+10;
Shower.Canvas.StretchDraw(Rect,Hoja);
end;
Thanks