Table of Contents

Constructor View

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

View(Rect)

Initializes a new instance of a AbsoluteView class with the absolute dimensions specified in the frame parameter.

public View(Rect frame)

Parameters

frame Rect

The region covered by this view.

Remarks

This constructor initialize a View with a LayoutStyle of Absolute. Use View to initialize a View with LayoutStyle of Computed

View()

Initializes a new instance of View using Computed layout.

public View()

Remarks

Use X, Y, Width, and Height properties to dynamically control the size and location of the view. The View will be created using Computed coordinates. The initial size (Frame) will be adjusted to fit the contents of Text, including newlines ('\n') for multiple lines.

If Height is greater than one, word wrapping is provided.

This constructor initialize a View with a LayoutStyle of Computed. Use X, Y, Width, and Height properties to dynamically control the size and location of the view.

View(int, int, ustring)

Initializes a new instance of View using Absolute layout.

public View(int x, int y, ustring text)

Parameters

x int

column to locate the View.

y int

row to locate the View.

text ustring

text to initialize the Text property with.

Remarks

The View will be created at the given coordinates with the given string. The size (Frame) will be adjusted to fit the contents of Text, including newlines ('\n') for multiple lines.

No line wrapping is provided.

View(Rect, ustring, Border)

Initializes a new instance of View using Absolute layout.

public View(Rect rect, ustring text, Border border = null)

Parameters

rect Rect

Location.

text ustring

text to initialize the Text property with.

border Border

The Border.

Remarks

The View will be created at the given coordinates with the given string. The initial size (Frame) will be adjusted to fit the contents of Text, including newlines ('\n') for multiple lines.

If rect.Height is greater than one, word wrapping is provided.

View(ustring, TextDirection, Border)

Initializes a new instance of View using Computed layout.

public View(ustring text, TextDirection direction = TextDirection.LeftRight_TopBottom, Border border = null)

Parameters

text ustring

text to initialize the Text property with.

direction TextDirection

The text direction.

border Border

The Border.

Remarks

The View will be created using Computed coordinates with the given string. The initial size (Frame) will be adjusted to fit the contents of Text, including newlines ('\n') for multiple lines.

If Height is greater than one, word wrapping is provided.