Page 1 of 1

MaxTextWidth and Soft LineBreaks

Posted: Tue Aug 04, 2015 10:13 am
by topm
I set MaxTextWidth for example to 200.

How can i find out, where TRichViewEdit startet a new line?

Posted: Tue Aug 04, 2015 1:06 pm
by Sergey Tkachenko
Information about line breaking is not documented.
You can use undocumented property: rv.RVData.DrawItems, a collection of "drawing item".
If a text item is broken between lines, each line of this item corresponds to one drawing items.
Each drawing item in this collection has properties:
ItemNo - index of item
Offs - for text items, index of the starting character in the item text
Length - for text items, count of characters in this drawing items
FromNewLine - true, if this drawing item starts a line or a paragraph