TPlusMemo.LineCount, ParagraphCount properties
PlusMemo Help Send comments on this topic.
TPlusMemo.LineCount, ParagraphCount properties

Glossary Item Box

 

Applies to

TPlusMemo, TDBPlusMemo

 

Declaration

property LineCount: Integer;

property ParagraphCount: Integer;

 

Description

Property LineCount indicates the number of lines.  It returns the same information as Lines.Count, except that when the last line is empty, Lines.Count does not take account of the last line.  Contrarily, LineCount always includes the last line in its result.

 

Similarly, ParagraphCount can be read to get the number of paragraphs in the control, including the last one even if it is empty (which is not the case for Paragraphs.Count).  ParagraphCount will always be at least 1, even if TPlusMemo.CharCount is zero. 

 

These properties are read only, and available at run time only.  It must be noted that with property WordWrap equal to True, the repartition of text into lines depends on the width of the control, the font size, and to some extent the presence of formatted text.  When WordWrap is False, each line corresponds to exactly one paragraph.

 

See Also

Lines and Paragraphs properties

PargrphOffset property