Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Rich Text problem

edited December 2003 in General
I have one problem.

it seems like the WordWrap Property on the ppRichText don't work.

If I do like:

MemStream:= TMemoryStream.Create;
RichEdit1.Lines.SaveToStream(MemStream);
MemStream.Position:= 0;
ppRichText1.WordWrap:= False;
ppRichText1.LoadFromRTFStream(Memstream);


and have WordWrap it still wrapp the lines from the RichText component.

Comments

  • edited December 2003
    Hi Mangus,

    Sorry, the WordWrap property has been included for the RichText component by
    mistake. This property will have no effect on the actual richtext of the
    TppRichText component.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2003
    So there is no way to get rid of the WordWrap ?
    The reason I wounder is that the help file for delph says that the WordWrap
    don't affect the rtf. It is only the way the RichText is displayed. My
    problem is that I have a rich text in a column (with a ppLine to the left
    and a ppLine to the right) and eaven if the text fit to that column it is
    wrapped. If I drag the richtext to be bigger and not to fit in the column
    the text is printed the way I want to. (it still fit's in the column and no
    lines have empty space at the end).

    for example:

    "some text"
    is printed like:

    |some |
    |text |

    but if the ppRichText exactly fit the space between the lines. Eaven when
    there is enough space for the whole line.

    if I stretch the ppRich text to stop outside the right line the text is
    printed correctly.

    If I some how can force the "word wrap" to not be used my problem should be
    solved.


  • edited December 2003
    Hi Mangus,

    If you would like to see how the spacing and wordwrapping is done in
    ReportBuilder, check out the ppDrwCmd.pas file inside the TppDrawRichText
    class. The spacing is based on the alloted space needed for each word to
    print. Try enlarging the TppRichText component and setting it's
    transparency property to True and see if this gives you the correct output.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2003
    It does, but it gives me the "Oout of reasources when I print using
    transparent field"


    Another thing that is strange is that I have a detail band wit the RichText
    in.
    On this detail band (that is set to dynamic)

    In this I have a ppRegion.

    In the region I have a pprich Text. and some vertical lines set to: Parent
    Heigth and stretch with parent.

    When the rich text goes over to a new page the lines are not on that new
    page. Only the region and RichText is on the new page. Why?

    BR

    Magnus
  • edited December 2003
    Hi Mangus,

    Try setting the ReprintOnOverflow property to True for the TppLine.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.