Class Dialog
The Dialog View is a Window that by default is centered and contains one
or more Button. It defaults to the Dialog color scheme and has a 1 cell padding around the edges.
Implements
System.Collections.IEnumerable
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)
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class Dialog : Window, IEnumerable
Remarks
To run the Dialog modally, create the Dialog, and pass it to Run().
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().
Constructors
Dialog(ustring, Int32, Int32, Button[])
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. |
Methods
AddButton(Button)
Declaration
public void AddButton(Button button)
Parameters
Type | Name | Description |
---|---|---|
Button | button | Button to add. |
LayoutSubviews()
Declaration
public override void LayoutSubviews()
Overrides
ProcessKey(KeyEvent)
Declaration
public override bool ProcessKey(KeyEvent kb)
Parameters
Type | Name | Description |
---|---|---|
KeyEvent | kb |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Implements
System.Collections.IEnumerable