我要输出的文字内容有很多(可能有1000多字),我想象TQRRichText那样可以自动换行。但是这个控件不能调字间距和行间距,而且我还希望可以在每一行都加上一横线。
请问有什么好方法或控件呢?

解决方案 »

  1.   

    autosize:=false;
    wordwrap:=true;
    换行!!!
      

  2.   

    參考一下
    function TfrmPrtGroupSQ.PrtString(prtCount: integer;EnterTimes:integer;var s:string): string;
    var
      i, j,k: integer;
      sLine: string;
      sCuted:string;
      iCutLength: integer;
      bIsDBCS:boolean;
      SpaceLines:string;
    begin
        SpaceLines:='';
        for k:=1 to Entertimes do
            SpaceLines:=SpaceLines+#13#10;
        sLine :=s;
        s:='';
        iCutLength:=prtCount;
        repeat  
          while (bytetype(sLine,iCutLength)<>mbTrailByte) do Dec(iCutLength);
          s:=s+Copy(sLine, 1, iCutLength)+SpaceLines;
          sLine := Copy(sLine, iCutLength + 1, Length(sLine) - iCutLength);
          iCutLength:=prtCount;
        until Length(trim(sLine)) <= 0;
    end;