diff --git a/Terminal.Gui/Windows/Wizard.cs b/Terminal.Gui/Windows/Wizard.cs index ec4fa3b1e..926cd4b86 100644 --- a/Terminal.Gui/Windows/Wizard.cs +++ b/Terminal.Gui/Windows/Wizard.cs @@ -103,6 +103,14 @@ namespace Terminal.Gui { helpTextView.SetNeedsDisplay (); }; + scrollBar.OtherScrollBarView.ChangedPosition += () => { + helpTextView.LeftColumn = scrollBar.OtherScrollBarView.Position; + if (helpTextView.LeftColumn != scrollBar.OtherScrollBarView.Position) { + scrollBar.OtherScrollBarView.Position = helpTextView.LeftColumn; + } + helpTextView.SetNeedsDisplay (); + }; + scrollBar.VisibleChanged += () => { if (scrollBar.Visible && helpTextView.RightOffset == 0) { helpTextView.RightOffset = 1; @@ -111,6 +119,14 @@ namespace Terminal.Gui { } }; + scrollBar.OtherScrollBarView.VisibleChanged += () => { + if (scrollBar.OtherScrollBarView.Visible && helpTextView.BottomOffset == 0) { + helpTextView.BottomOffset = 1; + } else if (!scrollBar.OtherScrollBarView.Visible && helpTextView.BottomOffset == 1) { + helpTextView.BottomOffset = 0; + } + }; + helpTextView.DrawContent += (e) => { scrollBar.Size = helpTextView.Lines; scrollBar.Position = helpTextView.TopRow; diff --git a/UICatalog/Scenarios/Dialogs.cs b/UICatalog/Scenarios/Dialogs.cs index 12a5e27f2..4f99d4568 100644 --- a/UICatalog/Scenarios/Dialogs.cs +++ b/UICatalog/Scenarios/Dialogs.cs @@ -174,13 +174,13 @@ namespace UICatalog.Scenarios { }; buttons.Add (button); } - if (buttons.Count > 1) { - buttons [1].Text = "Accept"; - buttons [1].IsDefault = true; - buttons [0].Visible = false; - buttons [0].Text = "_Back"; - buttons [0].IsDefault = false; - } + //if (buttons.Count > 1) { + // buttons [1].Text = "Accept"; + // buttons [1].IsDefault = true; + // buttons [0].Visible = false; + // buttons [0].Text = "_Back"; + // buttons [0].IsDefault = false; + //} // This tests dynamically adding buttons; ensuring the dialog resizes if needed and // the buttons are laid out correctly