Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

MemoEdit.CalcAutoHeight() Method

Calculates the control height, in pixels, sufficient to display all lines of the text without the need to scroll it vertically.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public int CalcAutoHeight()

#Returns

Type Description
Int32

An integer value that specifies the control height, in pixels, sufficient to display all text lines.

#Remarks

Use the CalcAutoHeight method to calculate the control height that is sufficient to display all lines of the text without the need to scroll it vertically. It takes into account the values of the current font, border style, and the word wrapping setting (see RepositoryItemMemoEdit.WordWrap) to calculate the appropriate height.

See Also