Hello,
I'm successfully drawing the richtext on a canvas by using the PaintRTFPage procedure. Now I'm trying to do the same, just with WordWrap. So I set RichText.WordWrap:=true, but now my procedure doesn't draw anything anymore. The canvas stays empty.
What do I do wrong?
This is my procedure (WordWrap is already true):
Code
StartY:=Rect.Top;
RichText.ReformatAll;
for Page:=0 to RichText.CountPages-1 do
begin
Result:=Result+RichText.Memo.PaintPageTextHeight[Page];
if Assigned(Bitmap) then Bitmap.Height:=Bitmap.Height+RichText.Memo.PaintPageTextHeight[Page];
RichText.Memo.PaintRTFPage(Page,Rect.Left,StartY,
{RichText.Memo.PaintPageWidth[Page]}
Rect.Right-Rect.Left,RichText.Memo.PaintPageHeight[Page],
Canvas,[wppWhiteIsTransparent,wppNoWatermarks],96,96);
end;
StartY:=StartY+RichText.Memo.PaintPageTextHeight[Page];
Alles anzeigen
Regards,
Björn