|
@@ -45,30 +45,6 @@ namespace UICatalog {
|
|
scrollView.ShowVerticalScrollIndicator = true;
|
|
scrollView.ShowVerticalScrollIndicator = true;
|
|
scrollView.ShowHorizontalScrollIndicator = true;
|
|
scrollView.ShowHorizontalScrollIndicator = true;
|
|
|
|
|
|
- //const string rule = "|123456789";
|
|
|
|
- //var horizontalRuler = new Label ("") {
|
|
|
|
- // X = 0,
|
|
|
|
- // Y = 0,
|
|
|
|
- // Width = Dim.Fill (1), // BUGBUG: I don't think this should be needed; DimFill() should respect container's frame. X does.
|
|
|
|
- // ColorScheme = Colors.Error
|
|
|
|
- //};
|
|
|
|
- //scrollView.Add (horizontalRuler);
|
|
|
|
- //const string vrule = "|\n1\n2\n3\n4\n5\n6\n7\n8\n9\n";
|
|
|
|
-
|
|
|
|
- //var verticalRuler = new Label ("") {
|
|
|
|
- // X = 0,
|
|
|
|
- // Y = 0,
|
|
|
|
- // Width = 1,
|
|
|
|
- // Height = Dim.Fill (),
|
|
|
|
- // ColorScheme = Colors.Error
|
|
|
|
- //};
|
|
|
|
- //scrollView.Add (verticalRuler);
|
|
|
|
-
|
|
|
|
- //Application.Resized += (sender, a) => {
|
|
|
|
- // horizontalRuler.Text = rule.Repeat ((int)Math.Ceiling ((double)(horizontalRuler.Bounds.Width) / (double)rule.Length)) [0..(horizontalRuler.Bounds.Width)];
|
|
|
|
- // verticalRuler.Text = vrule.Repeat ((int)Math.Ceiling ((double)(verticalRuler.Bounds.Height * 2) / (double)rule.Length)) [0..(verticalRuler.Bounds.Height * 2)];
|
|
|
|
- //};
|
|
|
|
-
|
|
|
|
var embedded1 = new Window ("1") {
|
|
var embedded1 = new Window ("1") {
|
|
X = 3,
|
|
X = 3,
|
|
Y = 3,
|
|
Y = 3,
|
|
@@ -96,57 +72,7 @@ namespace UICatalog {
|
|
embedded2.Add (embedded3);
|
|
embedded2.Add (embedded3);
|
|
|
|
|
|
scrollView.Add (embedded1);
|
|
scrollView.Add (embedded1);
|
|
-
|
|
|
|
- //scrollView.Add (new Button ("Press me!") {
|
|
|
|
- // X = 3,
|
|
|
|
- // Y = 3,
|
|
|
|
- // Clicked = () => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No")
|
|
|
|
- //});
|
|
|
|
-
|
|
|
|
- //scrollView.Add (new Button ("A very long button. Should be wide enough to demo clipping!") {
|
|
|
|
- // X = 3,
|
|
|
|
- // Y = 4,
|
|
|
|
- // Width = 50,
|
|
|
|
- // Clicked = () => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No")
|
|
|
|
- //});
|
|
|
|
-
|
|
|
|
- //scrollView.Add (new TextField ("This is a test of...") {
|
|
|
|
- // X = 3,
|
|
|
|
- // Y = 5,
|
|
|
|
- // Width = 50,
|
|
|
|
- // ColorScheme = Colors.Dialog
|
|
|
|
- //});
|
|
|
|
-
|
|
|
|
- //scrollView.Add (new TextField ("... the emergency broadcast sytem.") {
|
|
|
|
- // X = 3,
|
|
|
|
- // Y = 10,
|
|
|
|
- // Width = 50,
|
|
|
|
- // ColorScheme = Colors.Dialog
|
|
|
|
- //});
|
|
|
|
-
|
|
|
|
- //scrollView.Add (new TextField ("Last line") {
|
|
|
|
- // X = 3,
|
|
|
|
- // Y = 99,
|
|
|
|
- // Width = 50,
|
|
|
|
- // ColorScheme = Colors.Dialog
|
|
|
|
- //});
|
|
|
|
-
|
|
|
|
- //// Demonstrate AnchorEnd - Button is anchored to bottom/right
|
|
|
|
- //var anchorButton = new Button ("Bottom Right") {
|
|
|
|
- // Y = Pos.AnchorEnd () - 1,
|
|
|
|
- //};
|
|
|
|
- //// TODO: Use Pos.Width instead of (Right-Left) when implemented (#502)
|
|
|
|
- //anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton));
|
|
|
|
- //anchorButton.Clicked = () => {
|
|
|
|
- // // Ths demonstrates how to have a dynamically sized button
|
|
|
|
- // // Each time the button is clicked the button's text gets longer
|
|
|
|
- // // The call to Win.LayoutSubviews causes the Computed layout to
|
|
|
|
- // // get updated.
|
|
|
|
- // anchorButton.Text += "!";
|
|
|
|
- // Win.LayoutSubviews ();
|
|
|
|
- //};
|
|
|
|
- //scrollView.Add (anchorButton);
|
|
|
|
-
|
|
|
|
|
|
+
|
|
Top.Add (scrollView);
|
|
Top.Add (scrollView);
|
|
}
|
|
}
|
|
}
|
|
}
|