Table of Contents

Method SetContentHeight

Namespace
Terminal.Gui.ViewBase
Assembly
Terminal.Gui.dll

SetContentHeight(int?)

Sets the height of the View's content area independently of the width.

public void SetContentHeight(int? contentHeight)

Parameters

contentHeight int?

The new content height, or null to track the Viewport height.

Remarks

See the View Layout Deep Dive for more information: https://gui-cs.github.io/Terminal.Gui/docs/layout.html

Negative values are not supported.

If set to null, GetContentHeight() will track the Viewport height.

If set to a non-null value, the content height is independent of the Viewport height, enabling vertical scrolling.

This method follows the Cancellable Work Pattern (CWP). The ContentSizeChanging event is raised before the change, and ContentSizeChanged is raised after.

See Also