first, zoom...
- Code: Select all
PrintPreview1.BeginDoc;
PrintPreview1.Canvas.TextOut(100, 300, 'some string');
PrintPreview1.EndDoc;
after that, i put PrintPreview.Zoom := 150; in onClick event of PrintPreview. When i click on it, there's just blank page... not any text on it...
i called refresh and repaint, but still nothing...
How to show text after zoom in/out?
2nd question is about writing text in a rect.
i used textRect function
- Code: Select all
r.Top := 100;
r.Left := 100;
r.Bottom := 1000;
r.Right := 1000;
PrintPreview1.BeginDoc;
PrintPreview1.Canvas.TextRect(r, 100, 300, s);
PrintPreview1.EndDoc;
s is a string with length about 300 characters but i see only first 30-40. is there a way to write long and wrapped text?
3rd is about drawing lines...
i tried with this
- Code: Select all
r.Top := 100;
r.Left := 100;
r.Bottom := 1000;
r.Right := 1000;
PrintPreview1.Canvas.Pen.Style := psSolid;
PrintPreview1.Canvas.Pen.Width := 10;
PrintPreview1.BeginDoc;
PrintPreview1.Canvas.Rectangle(r.Top, r.Left, r.Bottom, r.Right);
PrintPreview1.Canvas.TextOut(100, 300, s);
PrintPreview1.EndDoc;
when i call preview, rectangle goes over text and text under it is not visible... is there a solution for that?
thnx in advance
Martin Jeremic
AGTim
www.agtim.com