mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Merge branch 'dialog_justify_buttons' into wizard
This commit is contained in:
@@ -141,11 +141,14 @@ namespace Terminal.Gui {
|
||||
/// </summary>
|
||||
Right
|
||||
}
|
||||
|
||||
private ButtonAlignments buttonAlignment = Dialog.ButtonAlignments.Center;
|
||||
|
||||
/// <summary>
|
||||
/// Determines how the <see cref="Dialog"/> <see cref="Button"/>s are aligned along the
|
||||
/// bottom of the dialog.
|
||||
/// </summary>
|
||||
public ButtonAlignments ButtonAlignment = Dialog.ButtonAlignments.Center;
|
||||
public ButtonAlignments ButtonAlignment { get => buttonAlignment; set => buttonAlignment = value; }
|
||||
|
||||
void LayoutStartedHandler ()
|
||||
{
|
||||
|
||||
@@ -148,9 +148,12 @@ namespace UICatalog.Scenarios {
|
||||
};
|
||||
showDialogButton.Clicked += () => {
|
||||
try {
|
||||
int width = int.Parse (widthEdit.Text.ToString ());
|
||||
int height = int.Parse (heightEdit.Text.ToString ());
|
||||
int numButtons = int.Parse (numButtonsEdit.Text.ToString ());
|
||||
int width = 0;
|
||||
int.TryParse (widthEdit.Text.ToString (), out width);
|
||||
int height = 0;
|
||||
int.TryParse (heightEdit.Text.ToString (), out height);
|
||||
int numButtons = 3;
|
||||
int.TryParse (numButtonsEdit.Text.ToString (), out numButtons);
|
||||
|
||||
var buttons = new List<Button> ();
|
||||
var clicked = -1;
|
||||
|
||||
@@ -576,7 +576,7 @@ namespace Terminal.Gui.ConsoleDrivers {
|
||||
││ Hello World │ │
|
||||
││ │ │
|
||||
││ │ │
|
||||
││ [ Ok ] │ │
|
||||
││ [ Ok ] │ │
|
||||
│└───────────────┘ │
|
||||
└──────────────────┘
|
||||
";
|
||||
@@ -593,7 +593,7 @@ namespace Terminal.Gui.ConsoleDrivers {
|
||||
││ Hello World │ │
|
||||
││ │ │
|
||||
││ │ │
|
||||
││ [ Ok ] │ │
|
||||
││ [ Ok ] │ │
|
||||
│└───────────────┘ │
|
||||
└──────────────────┘
|
||||
";
|
||||
|
||||
Reference in New Issue
Block a user