Show / Hide Table of Contents

    Class MessageBox

    MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from.
    Inheritance
    System.Object
    MessageBox
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public static class MessageBox
    Examples
    var n = MessageBox.Query (50, 7, "Quit Demo", "Are you sure you want to quit this demo?", "Yes", "No");
    if (n == 0)
       quit = true;
    else
       quit = false;

    Methods

    ErrorQuery(Int32, Int32, String, String, String[])

    Presents an error MessageBox 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, params 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 normal MessageBox 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, params 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.
    Back to top Generated by DocFX