|
@@ -24,6 +24,7 @@ public class Scrolling : Scenario
|
|
|
Y = 3,
|
|
|
Width = Dim.Fill (3),
|
|
|
Height = Dim.Fill (3),
|
|
|
+ BorderStyle = LineStyle.None
|
|
|
};
|
|
|
|
|
|
var label = new Label { X = 0, Y = 0 };
|
|
@@ -37,13 +38,13 @@ public class Scrolling : Scenario
|
|
|
Width = 60,
|
|
|
Height = 20,
|
|
|
ColorScheme = Colors.ColorSchemes ["TopLevel"],
|
|
|
- ContentSize = new (200, 100),
|
|
|
+ ContentSize = new (120, 40),
|
|
|
|
|
|
//ContentOffset = Point.Empty,
|
|
|
ShowVerticalScrollIndicator = true,
|
|
|
ShowHorizontalScrollIndicator = true
|
|
|
};
|
|
|
- scrollView.Padding.Thickness = new (1);
|
|
|
+ // scrollView.Padding.Thickness = new (1);
|
|
|
|
|
|
label.Text = $"{scrollView}\nContentSize: {scrollView.ContentSize}\nContentOffset: {scrollView.ContentOffset}";
|
|
|
|
|
@@ -58,6 +59,7 @@ public class Scrolling : Scenario
|
|
|
Height = 2,
|
|
|
ColorScheme = Colors.ColorSchemes ["Error"]
|
|
|
};
|
|
|
+ horizontalRuler.Visible = false;
|
|
|
scrollView.Add (horizontalRuler);
|
|
|
|
|
|
const string vrule = "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n";
|
|
@@ -71,9 +73,11 @@ public class Scrolling : Scenario
|
|
|
Height = Dim.Fill (),
|
|
|
ColorScheme = Colors.ColorSchemes ["Error"]
|
|
|
};
|
|
|
+ horizontalRuler.Visible = false;
|
|
|
scrollView.Add (verticalRuler);
|
|
|
|
|
|
var pressMeButton = new Button { X = 3, Y = 3, Text = "Press me!" };
|
|
|
+ pressMeButton.Visible = false;
|
|
|
pressMeButton.Accept += (s, e) => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
|
|
|
scrollView.Add (pressMeButton);
|
|
|
|
|
@@ -85,6 +89,7 @@ public class Scrolling : Scenario
|
|
|
Width = Dim.Fill (3),
|
|
|
Text = "A very long button. Should be wide enough to demo clipping!"
|
|
|
};
|
|
|
+ aLongButton.Visible = false;
|
|
|
aLongButton.Accept += (s, e) => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
|
|
|
scrollView.Add (aLongButton);
|
|
|
|
|
@@ -95,7 +100,8 @@ public class Scrolling : Scenario
|
|
|
Y = 5,
|
|
|
Width = 50,
|
|
|
ColorScheme = Colors.ColorSchemes ["Dialog"],
|
|
|
- Text = "This is a test of..."
|
|
|
+ Text = "This is a test of...",
|
|
|
+ //Visible = false
|
|
|
}
|
|
|
);
|
|
|
|
|
@@ -106,7 +112,8 @@ public class Scrolling : Scenario
|
|
|
Y = 10,
|
|
|
Width = 50,
|
|
|
ColorScheme = Colors.ColorSchemes ["Dialog"],
|
|
|
- Text = "... the emergency broadcast system."
|
|
|
+ Text = "... the emergency broadcast system.",
|
|
|
+ Visible = false
|
|
|
}
|
|
|
);
|
|
|
|
|
@@ -117,7 +124,8 @@ public class Scrolling : Scenario
|
|
|
Y = 99,
|
|
|
Width = 50,
|
|
|
ColorScheme = Colors.ColorSchemes ["Dialog"],
|
|
|
- Text = "Last line"
|
|
|
+ Text = "Last line",
|
|
|
+ Visible = false
|
|
|
}
|
|
|
);
|
|
|
|
|
@@ -223,6 +231,7 @@ public class Scrolling : Scenario
|
|
|
|
|
|
// Add a progress bar to cause constant redraws
|
|
|
var progress = new ProgressBar { X = Pos.Right (scrollView) + 1, Y = Pos.AnchorEnd (2), Width = 50 };
|
|
|
+
|
|
|
app.Add (progress);
|
|
|
|
|
|
var pulsing = true;
|