From d8aa05bd68357572a32af1e62ae8855f45968114 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Thu, 21 May 2020 09:41:54 -0600 Subject: [PATCH] renamed scenario and flushed out --- UICatalog/Scenarios/DimAndPosLayout.cs | 82 -------------------------- 1 file changed, 82 deletions(-) delete mode 100644 UICatalog/Scenarios/DimAndPosLayout.cs diff --git a/UICatalog/Scenarios/DimAndPosLayout.cs b/UICatalog/Scenarios/DimAndPosLayout.cs deleted file mode 100644 index f1f543a57..000000000 --- a/UICatalog/Scenarios/DimAndPosLayout.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Terminal.Gui; - -namespace UICatalog { - /// - /// This Scenario demonstrates how to use Termina.gui's Dim and Pos Layout System. - /// [x] - Using Dim.Fill to fill a window - /// [x] - Using Dim.Fill and Dim.Pos to automatically align controls based on an initial control - /// [ ] - ... - /// - [ScenarioMetadata (Name: "DimAndPosLayout", Description: "Demonstrates using the Dim and Pos Layout System")] - [ScenarioCategory ("Layout")] - class DimAndPosLayout : Scenario { - - public override void Setup () - { - Top.LayoutStyle = LayoutStyle.Computed; - // Demonstrate using Dim to create a ruler that always measures the top-level window's width - // BUGBUG: Dim.Fill returns too big a value sometimes. - //const string rule = "|123456789"; - //var labelRuler = new Label ("ruler") { - // 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 - //}; - - //Application.OnResized += () => { - // labelRuler.Text = rule.Repeat ((int)Math.Ceiling((double)(labelRuler.Bounds.Width) / (double)rule.Length))[0..(labelRuler.Bounds.Width)]; - //}; - - //win.Add (labelRuler); - - // Demonstrate using Dim to create a window that fills the parent with a margin - int margin = 20; - var subWin = new Window ($"Sub Windoww with {margin} character margin") { - X = margin, - Y = 2, - Width = Dim.Fill (margin), - Height = Dim.Fill () - }; - Win.Add (subWin); - - int i = 1; - string txt = "Hello world, how are you doing today"; - var labelList = new List