Table of Contents

Method ErrorQuery

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

ErrorQuery(int, int, string, string, params string[])

Presents an error MessageBox with the specified title and message and a list of buttons.

public static int ErrorQuery(int width, int height, string title, string message, params string[] buttons)

Parameters

width int

Width for the MessageBox.

height int

Height for the MessageBox.

title string

Title for the MessageBox.

message string

Message to display; might contain multiple lines. The message will be word=wrapped by default.

buttons string[]

Array of buttons to add.

Returns

int

The index of the selected button, or -1 if the user pressed QuitKey to close the MessageBox.

Remarks

Use ErrorQuery(string, string, params string[]) instead; it automatically sizes the MessageBox based on the contents.

ErrorQuery(string, string, params string[])

Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.

public static int ErrorQuery(string title, string message, params string[] buttons)

Parameters

title string

Title for the query.

message string

Message to display; might contain multiple lines. The message will be word=wrapped by default.

buttons string[]

Array of buttons to add.

Returns

int

The index of the selected button, or -1 if the user pressed QuitKey to close the MessageBox.

Remarks

The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the title, message. and buttons.

ErrorQuery(int, int, string, string, int, params string[])

Presents an error MessageBox with the specified title and message and a list of buttons.

public static int ErrorQuery(int width, int height, string title, string message, int defaultButton = 0, params string[] buttons)

Parameters

width int

Width for the MessageBox.

height int

Height for the MessageBox.

title string

Title for the MessageBox.

message string

Message to display; might contain multiple lines. The message will be word=wrapped by default.

defaultButton int

Index of the default button.

buttons string[]

Array of buttons to add.

Returns

int

The index of the selected button, or -1 if the user pressed QuitKey to close the MessageBox.

Remarks

Use ErrorQuery(string, string, params string[]) instead; it automatically sizes the MessageBox based on the contents.

ErrorQuery(string, string, int, params string[])

Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.

public static int ErrorQuery(string title, string message, int defaultButton = 0, params string[] buttons)

Parameters

title string

Title for the MessageBox.

message string

Message to display; might contain multiple lines. The message will be word=wrapped by default.

defaultButton int

Index of the default button.

buttons string[]

Array of buttons to add.

Returns

int

The index of the selected button, or -1 if the user pressed QuitKey to close the MessageBox.

Remarks

The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the title, message. and buttons.

ErrorQuery(int, int, string, string, int, bool, params string[])

Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.

public static int ErrorQuery(int width, int height, string title, string message, int defaultButton = 0, bool wrapMessage = true, params string[] buttons)

Parameters

width int

Width for the window.

height int

Height for the window.

title string

Title for the query.

message string

Message to display; might contain multiple lines. The message will be word=wrapped by default.

defaultButton int

Index of the default button.

wrapMessage bool

If wrap the message or not.

buttons string[]

Array of buttons to add.

Returns

int

The index of the selected button, or -1 if the user pressed QuitKey to close the MessageBox.

Remarks

Use ErrorQuery(string, string, params string[]) instead; it automatically sizes the MessageBox based on the contents.

ErrorQuery(string, string, int, bool, params string[])

Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.

public static int ErrorQuery(string title, string message, int defaultButton = 0, bool wrapMessage = true, params string[] buttons)

Parameters

title string

Title for the query.

message string

Message to display; might contain multiple lines. The message will be word=wrapped by default.

defaultButton int

Index of the default button.

wrapMessage bool

If wrap the message or not. The default is true

buttons string[]

Array of buttons to add.

Returns

int

The index of the selected button, or -1 if the user pressed QuitKey to close the MessageBox.

Remarks

The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the title, message. and buttons.