Class MessageBox
Message box displays a modal message to the user, with a title, a message and a series of options that the user can choose from.
Inheritance
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public static class MessageBox
Methods
ErrorQuery(Int32, Int32, String, String, String[])
Presents an error message box with the specified title and message and a list of buttons to show to the user.
Declaration
public static int ErrorQuery (int width, int height, string title, string message, string[] buttons);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | Width for the window. |
System.Int32 | height | Height for the window. |
System.String | title | Title for the query. |
System.String | message | Message to display, might contain multiple lines.. |
System.String[] | buttons | Array of buttons to add. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the selected button, or -1 if the user pressed ESC to close the dialog. |
Query(Int32, Int32, String, String, String[])
Presents a message with the specified title and message and a list of buttons to show to the user.
Declaration
public static int Query (int width, int height, string title, string message, string[] buttons);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | Width for the window. |
System.Int32 | height | Height for the window. |
System.String | title | Title for the query. |
System.String | message | Message to display, might contain multiple lines.. |
System.String[] | buttons | Array of buttons to add. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the selected button, or -1 if the user pressed ESC to close the dialog. |