Page 1 of 1

TextRect and WordWrap

PostPosted: May 14th, 2007, 10:52 am
by martinj
Can somebody tell me is there an easy way to print wrapped text with TextRect method?

Here's my code:

Code: Select all
      PrintPreview1.BeginDoc;
      begin
        r.Left := 250;
        r.Right := 900;
        r.Top := 100;
        r.Bottom := 5000;

        PrintPreview1.Canvas.TextRect(r, r.Left, r.Top,  Long Text);
      end;
      PrintPreview1.EndDoc;


Long Text is an memo field from database.

Thanks in Advance.

PostPosted: May 14th, 2007, 1:56 pm
by Kambiz
Look for WrapText procedure in Delphi's Help. It is defined in SysUtils unit.