Freigeben über


TextHeight Method

Returns the height of a text string as it would be displayed in the current font.

 [nHeight =] [FormSet.]Object.TextHeight(cText)

Parameters

  • nHeight
    Returns a value in pixels specifying the height of the text string.
  • cText
    Specifies the character string for which the text height is determined.

Remarks

The TextHeight method determines the amount of vertical space required to display cText. The height returned includes the leading space above and below the character string, so you can use the height returned to calculate and position multiple lines of text within the form. If cText contains embedded carriage returns, the TextHeight method returns the cumulative height of the lines, including the leading space above and below each line.

See Also

FontSize Property | ScaleMode Property | TextWidth Method

Applies To: Form | _SCREEN