Class Dialog
The Dialog View is a Window that by default is centered and contains one
or more Buttons. It defaults to the Dialog color scheme and has a 1 cell padding around the edges.
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize
Remarks
To run the Dialog modally, create the Dialog, and pass it to Run(Func<Exception, Boolean>).
This will execute the dialog until it terminates via the [ESC] or [CTRL-Q] key, or when one of the views
or buttons added to the dialog calls RequestStop(Toplevel).
Inherited Members
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class Dialog : Window
Constructors
Dialog()
Declaration
public Dialog()
Dialog(ustring, Int32, Int32, Button[])
Initializes a new instance of the Dialog class using Computed positioning
and an optional set of Buttons to display
Declaration
public Dialog(ustring title, int width, int height, params Button[] buttons)
Parameters
Type | Name | Description |
---|---|---|
NStack.ustring | title | Title for the dialog. |
System.Int32 | width | Width for the dialog. |
System.Int32 | height | Height for the dialog. |
Button[] | buttons | Optional buttons to lay out at the bottom of the dialog. |
Dialog(ustring, Button[])
Initializes a new instance of the Dialog class using Computed positioning
and with an optional set of Buttons to display
Declaration
public Dialog(ustring title, params Button[] buttons)
Parameters
Type | Name | Description |
---|---|---|
NStack.ustring | title | Title for the dialog. |
Button[] | buttons | Optional buttons to lay out at the bottom of the dialog. |
Properties
ButtonAlignment
Declaration
public Dialog.ButtonAlignments ButtonAlignment { get; set; }
Property Value
Type | Description |
---|---|
Dialog.ButtonAlignments |
Methods
AddButton(Button)
Declaration
public void AddButton(Button button)
Parameters
Type | Name | Description |
---|---|---|
Button | button | Button to add. |
ProcessKey(KeyEvent)
If the view is focused, gives the view a
chance to process the keystroke.
Declaration
public override bool ProcessKey(KeyEvent kb)
Parameters
Type | Name | Description |
---|---|---|
KeyEvent | kb |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize