Table of Contents

Constructor Button

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Button()

Initializes a new instance of Button using Computed layout.

public Button()

Remarks

The width of the Button is computed based on the text length. The height will always be 1.

Button(ustring, bool)

Initializes a new instance of Button using Computed layout.

public Button(ustring text, bool is_default = false)

Parameters

text ustring

The button's text

is_default bool

If true, a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button.

Remarks

The width of the Button is computed based on the text length. The height will always be 1.

Button(int, int, ustring)

Initializes a new instance of Button using Absolute layout, based on the given text

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

Parameters

x int

X position where the button will be shown.

y int

Y position where the button will be shown.

text ustring

The button's text

Remarks

The width of the Button is computed based on the text length. The height will always be 1.

Button(int, int, ustring, bool)

Initializes a new instance of Button using Absolute layout, based on the given text.

public Button(int x, int y, ustring text, bool is_default)

Parameters

x int

X position where the button will be shown.

y int

Y position where the button will be shown.

text ustring

The button's text

is_default bool

If true, a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button.

Remarks

The width of the Button is computed based on the text length. The height will always be 1.