Table of Contents

Method ErrorQuery

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

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

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, ustring title, ustring message, params ustring[] buttons)

Parameters

width int

Width for the window.

height int

Height for the window.

title ustring

Title for the query.

message ustring

Message to display, might contain multiple lines.

buttons ustring[]

Array of buttons to add.

Returns

int

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

Remarks

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

ErrorQuery(ustring, ustring, params ustring[])

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

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

Parameters

title ustring

Title for the query.

message ustring

Message to display, might contain multiple lines.

buttons ustring[]

Array of buttons to add.

Returns

int

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

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, ustring, ustring, int, params ustring[])

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, ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)

Parameters

width int

Width for the window.

height int

Height for the window.

title ustring

Title for the query.

message ustring

Message to display, might contain multiple lines.

defaultButton int

Index of the default button.

buttons ustring[]

Array of buttons to add.

Returns

int

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

Remarks

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

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

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

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

Parameters

title ustring

Title for the query.

message ustring

Message to display, might contain multiple lines.

defaultButton int

Index of the default button.

buttons ustring[]

Array of buttons to add.

Returns

int

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

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, ustring, ustring, int, Border, params ustring[])

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, ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)

Parameters

width int

Width for the window.

height int

Height for the window.

title ustring

Title for the query.

message ustring

Message to display, might contain multiple lines.

defaultButton int

Index of the default button.

border Border

The border settings.

buttons ustring[]

Array of buttons to add.

Returns

int

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

Remarks

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

ErrorQuery(ustring, ustring, int, Border, params ustring[])

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

public static int ErrorQuery(ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)

Parameters

title ustring

Title for the query.

message ustring

Message to display, might contain multiple lines.

defaultButton int

Index of the default button.

border Border

The border settings.

buttons ustring[]

Array of buttons to add.

Returns

int

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

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.