Rich Text problem
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.
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.
This discussion has been closed.
Comments
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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.
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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
Try setting the ReprintOnOverflow property to True for the TppLine.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com