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 QuitKey to close the MessageBox. This is useful for web based console where there is no SynchronizationContext or TaskScheduler.

DefaultBorderStyle

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

DefaultButtonAlignment

The default Alignment for Dialog.

DefaultMinimumHeight

Defines the default minimum Dialog height, as a percentage of the screen width. Can be configured via ConfigurationManager.

DefaultMinimumWidth

Defines the default minimum MessageBox width, as a percentage of the screen width. 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.

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

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

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 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 MessageBox with the specified title and message and a list of buttons.

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

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

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

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

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

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

Query(string, string, params string[])

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