private Control MakeNode(string s) { System.Diagnostics.Debug.WriteLine("Make node " + s); ExtendedControls.TabStrip tabstrip = new ExtendedControls.TabStrip(); tabstrip.Dock = DockStyle.Fill; tabstrip.StripMode = ExtendedControls.TabStrip.StripModeType.StripTop; // tabstrip.StripMode = ExtendedControls.TabStrip.StripModeType.ListSelection; tabstrip.BackColor = Color.AliceBlue; tabstrip.ImageList = new Bitmap[] { TestExtendedControls.Properties.Resources.galaxy_red, TestExtendedControls.Properties.Resources.galaxy_gray, TestExtendedControls.Properties.Resources.galaxy_gray, TestExtendedControls.Properties.Resources.galaxy_white, TestExtendedControls.Properties.Resources.galaxy_gray, TestExtendedControls.Properties.Resources.galaxy_white, }; tabstrip.TextList = new string[] { "icon 0", "icon 1", "icon 2", "icon 3", "icon 4", "icon 5", }; tabstrip.Name = s; tabstrip.OnCreateTab += OnCreateTab; tabstrip.OnPopOut += (t, i) => System.Diagnostics.Debug.WriteLine("Command pop out" + t + " " + i); return(tabstrip); }
private Control OnCreateTab(ExtendedControls.TabStrip t, int no) { UserControl uc = new UserControl(); uc.BackColor = Color.Cyan; uc.AutoScaleMode = AutoScaleMode.Font; DLabel lb = new DLabel(); lb.Location = new Point(10, 10); lb.Size = new Size(200, 24); lb.Text = t.Name + " User Control " + (no + 0); ExtButton bb = new ExtButton(); bb.Location = new Point(10, 40); bb.Size = new Size(40, 40); bb.Text = "BUT"; bb.Name = "UC " + no + " BUT"; uc.Controls.Add(bb); uc.Name = "UC " + no + "!."; uc.Dock = DockStyle.Fill; uc.Controls.Add(lb); t.SetControlText("CT<" + uc.Name + ">"); Theme.Current.ApplyStd(uc); return(uc); }
private Control OnCreateTab(ExtendedControls.TabStrip t, int no) { UserControl uc = new UserControl(); uc.BackColor = Color.Cyan; Label lb = new Label(); lb.Location = new Point(10, 10); lb.Size = new Size(200, 20); lb.Text = t.Name + " User Control " + (no + 0); uc.Name = "UC " + no; uc.Dock = DockStyle.Fill; uc.Controls.Add(lb); t.SetControlText("CT<" + uc.Name + ">"); return(uc); }