Table of Contents

Property ConstrainToWidth

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

ConstrainToWidth

Gets or sets the width Text will be constrained to when formatted.

public int? ConstrainToWidth { get; set; }

Property Value

int?

Remarks

Does not return the width of the formatted text but the width that will be used to constrain the text when formatted.

If null the height will be unconstrained. if both ConstrainToWidth and ConstrainToHeight are null the text will be formatted to the size of the text.

Use FormatAndGetSize(Size?) to get the size of the formatted text.

When set, NeedsFormat is set to true.