protected override void OnLoad(EventArgs e) { base.OnLoad(e); CollapsibleList control = new CollapsibleList(this); //control.ClientBackColor = Color.CornflowerBlue; control.SetSize(100, 200); control.SetPosition(10, 10); control.ItemSelected += OnSelection; control.CategoryCollapsed += OnCollapsed; { CollapsibleCategory cat = control.Add("Category One"); cat.TextColor = Color.LightGreen; cat.UseCurrentColorAsNormal = true; cat.Add("Hello"); cat.Add("Two"); cat.Add("Three"); cat.Add("Four"); } { CollapsibleCategory cat = control.Add("Shopping"); cat.TextColor = Color.Yellow; cat.UseCurrentColorAsNormal = true; cat.Add("Special"); cat.Add("Two Noses"); cat.Add("Orange ears"); cat.Add("Beer"); cat.Add("Three Eyes"); cat.Add("Special"); cat.Add("Two Noses"); cat.Add("Orange ears"); cat.Add("Beer"); cat.Add("Three Eyes"); cat.Add("Special"); cat.Add("Two Noses"); cat.Add("Orange ears"); cat.Add("Beer"); cat.Add("Three Eyes"); } { CollapsibleCategory cat = control.Add("Category Two"); cat.TextColor = Color.Pink; cat.UseCurrentColorAsNormal = true; cat.Add("Hello 2"); cat.Add("Two 2"); cat.Add("Three 2"); cat.Add("Four 2"); } }
Alt.GUI.Temporary.Gwen.Control.Button RegisterDemo(string name, CollapsibleCategory cat, Type exampleType, Example__Base example) { Alt.GUI.Temporary.Gwen.Control.Button btn = cat.Add(name); btn.UserData = new ExampleNode(exampleType, example, m_Center, this); btn.Clicked += OnExampleSelect; return(btn); }
public CollapsibleListTest(ControlBase parent) : base(parent) { CollapsibleList control = new CollapsibleList(this); control.Dock = Net.Dock.Fill; control.HorizontalAlignment = Net.HorizontalAlignment.Left; control.ItemSelected += OnSelection; control.CategoryCollapsed += OnCollapsed; { CollapsibleCategory cat = control.Add("Category One"); cat.Add("Hello"); cat.Add("Two"); cat.Add("Three"); cat.Add("Four"); } { CollapsibleCategory cat = control.Add("Shopping"); cat.Add("Special"); cat.Add("Two Noses"); cat.Add("Orange ears"); cat.Add("Beer"); cat.Add("Three Eyes"); cat.Add("Special"); cat.Add("Two Noses"); cat.Add("Orange ears"); cat.Add("Beer"); cat.Add("Three Eyes"); cat.Add("Special"); cat.Add("Two Noses"); cat.Add("Orange ears"); cat.Add("Beer"); cat.Add("Three Eyes"); } { CollapsibleCategory cat = control.Add("Category One"); cat.Add("Hello"); cat.Add("Two"); cat.Add("Three"); cat.Add("Four"); } }
public void RegisterUnitTest(string name, CollapsibleCategory cat, GUnit test) { Control.Button btn = cat.Add(name); test.Dock = Pos.Fill; test.Hide(); test.UnitTest = this; btn.UserData = test; btn.Clicked += OnCategorySelect; }
private ControlBase AddPage(CollapsibleCategory category, string name) { var btn = category.Add(name); Panel panel = new Panel(this); panel.Dock = Dock.Fill; panel.Hide(); btn.UserData = panel; category.Selected += CategorySelected; return(panel); }
private ControlBase AddPage(CollapsibleCategory category, string name) { var btn = category.Add(name); Panel panel = new Panel(this); panel.Dock = Dock.Fill; panel.Padding = Padding.Five; panel.Hide(); panel.UserData = _tabscount; btn.UserData = panel; category.Selected += CategorySelected; if (_tabscount == Settings.SettingsPane) { btn.Press(); } _tabscount += 1; return(panel); }