Table of Contents

Class MessageBox

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from.

public static class MessageBox
Inheritance
MessageBox
Inherited Members

Examples

var n = MessageBox.Query ("Quit Demo", "Are you sure you want to quit this demo?", "Yes", "No");
if (n == 0)
   quit = true;
else
   quit = false;

Properties

Clicked

The index of the selected button, or -1 if the user pressed ESC to close the dialog. This is useful for web based console where by default there is no SynchronizationContext or TaskScheduler.

DefaultBorderStyle

Defines the default border styling for Dialog. Can be configured via ConfigurationManager.

Methods

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.

ErrorQuery(int, int, 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.

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

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

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.

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.

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.

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

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

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

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

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

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

Query(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.

Query(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.

Query(string, string, params string[])

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