windowsforms-devexpress-dot-xtraeditors-dot-memoedit-3a4d4eb1.md
Gets or sets how the height of a MemoEdit control adjusts to fit its content when placed within a LayoutControl.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(MemoEditLayoutControlAutoHeightMode.Default)]
[DXCategory("Layout")]
public MemoEditLayoutControlAutoHeightMode LayoutControlAutoHeightMode { get; set; }
<DefaultValue(MemoEditLayoutControlAutoHeightMode.Default)>
<DXCategory("Layout")>
Public Property LayoutControlAutoHeightMode As MemoEditLayoutControlAutoHeightMode
| Type | Default | Description |
|---|---|---|
| MemoEditLayoutControlAutoHeightMode | Default |
A MemoEditLayoutControlAutoHeightMode enum value that specifies how the MemoEdit control adjusts its height based on content.
|
Available values:
| Name | Description |
|---|---|
| None |
MemoEdit height remains fixed and does not adjust to content. A scrollbar appears if the content exceeds the available height.
| | Default |
Equivalent to None. MemoEdit height remains fixed and does not adjust to content. A scrollbar appears if the content exceeds the available height.
| | GrowOnly |
MemoEdit height increases to fit content but does not decrease when content is reduced.
| | GrowAndShrink |
MemoEdit height increases or decreases automatically to fit content.
|
With default settings, a MemoEdit control within a LayoutControl displays a scrollbar if its content does not fit the height. Set the LayoutControlAutoHeightMode property to automatically adjust the MemoEdit height based on content.
The following animation shows a MemoEdit control with LayoutControlAutoHeightMode set to GrowAndShrink:
Note
If the control’s MaximumSize property is set and content reaches the height limit, MemoEdit height remains unchanged (it neither grows nor shrinks). To adjust the height dynamically, handle the TextChanged event and call the CalcAutoHeight() method.
See Also