MaxTextWidth and Soft LineBreaks

General TRichView support forum. Please post your questions here
Post Reply
topm
Posts: 1
Joined: Wed Jun 25, 2014 2:54 pm

MaxTextWidth and Soft LineBreaks

Post by topm »

I set MaxTextWidth for example to 200.

How can i find out, where TRichViewEdit startet a new line?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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
Post Reply