mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 09:18:01 +01:00
Wizard and Dialog fix. (#1803)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user