SharpLeaf Reference > SharpLeaf Methods > GetTextHeight Method

SharpLeaf.GetTextHeight Method

Measure the height taken by a paragraph of text, interpreting linebreaks, possibly wrapping inside a specified width.

Overloads

Result

Measured height.

Example

  // Measure height when wrapping text within an inch
   style = new ParagraphStyle(lf.Style,"Wrap=true");
   height = lf.GetTextHeight("Hello\nworld",style,72);

Description

Measurement assumes constant width, and ignores tab stops.

Width is ignored if ParagraphStyle.Wrap is false.

See also ...

SharpLeaf Members


Send comments on this topic
© Dyalog Ltd 2021