用QRMemo控件,打印内容字数太多,怎么让它自动换行呢?wordwrap属性为true也不行,求助!

解决方案 »

  1.   

    呵,看下面的.思路,用一个Memo控件.想不到吧.再加上下面方法就行啦.procedure lineBreakQRMemo(text: string; const textMemo: TMemo; const QRMemo: TQRMemo);
    var
      i: integer;
    begin
      textMemo.Width := QRMemo.Width;
      textMemo.Height := QRMemo.Height;
      textMemo.Font.Name := QRMemo.Font.Name;
      textMemo.Font.Size := QRMemo.Font.Size;
      textMemo.Text := text;
      QRMemo.Lines.Clear;
      for i := 0 to textMemo.Lines.Count - 1 do
        QRMemo.Lines.Add(textMemo.Lines.Strings[i]);
    end;参数就不用我说了吧.