LoadFromString creates an empty line in a cell

  • Hi

    When I insert formatted RTF text in a table cell with

    Code
    tmpParagraph.RowLast.Cols[0].LoadFromString(rtfString, 'AUTO', '', [wploadpar_AsChildrenPar]);

    it creates an empty line at top of the cell. The same formatted text does not have an empty line at the top. When I use LoadFromString of the RichText with the same RTF string there is no empty line as expected. Using SetText in a cell with plain text also works fine wihout unwanted empty lines but I need formatted text in a cell.

    Below code do not generate empty lines.

    // in a cell

    Code
    tmpParagraph.RowLast.Cols[0].SetText(PlainString);

    // in the RichText

    Code
    tmpGridText.LoadFromString(rtfString);

    Bora Aydemir

  • If I don't use the [wploadpar_AsChildrenPar] parameter the alignment of the original RTF string is lost. Is there a way to use

    Code
    tmpParagraph.RowLast.Cols[0].LoadFromString(rtfString, 'AUTO', '', [?]);

    without loosing the alignment of the RtfString?

    Bora