Table of Contents

Property Text

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

Text

The text displayed by the View.

public string Text { get; set; }

Property Value

string

Remarks

The text will be drawn before any subviews are drawn.

The text will be drawn starting at the view origin (0, 0) and will be formatted according to TextAlignment and TextDirection.

The text will word-wrap to additional lines if it does not fit horizontally. If GetContentSize() 's height is 1, the text will be clipped.

If Width or Height are using Text, the GetContentSize() will be adjusted to fit the text.

Setting Text to the same value as the current value is a no-op; neither TextChanging nor TextChanged will be raised.

Before the text is changed, the TextChanging CWP hook is invoked. If cancelled, the text remains unchanged and TextChanged is not raised.

After the text is changed, the TextChanged event is raised.