public TabbedControls(Dictionary<ToolStripButton, System.Windows.Forms.Control> controls) { this.controls = controls; controls.Keys.ForEach(b => b.ImageAlign = ContentAlignment.MiddleLeft); ToolTabs = new ToolTabs(controls.Keys.ToArray()) {Stretch = true, GripStyle = ToolStripGripStyle.Hidden, Dock = DockStyle.Left}; base.Dock = DockStyle.Fill; ToolTabs.ActiveButtonChanged += toolTabs_ActiveButtonChanged; Controls.AddRange(new System.Windows.Forms.Control[] {OkCancelBar, ToolTabs}); controls.Values.ForEach(g => Controls.Add(g)); controls.Values.ForEach(c => c.BringToFront()); ToolTabs.ActiveButton = controls.Keys.First(); }
public TabbedControls(Dictionary <ToolStripButton, System.Windows.Forms.Control> controls) { this.controls = controls; controls.Keys.ForEach(b => b.ImageAlign = ContentAlignment.MiddleLeft); ToolTabs = new ToolTabs(controls.Keys.ToArray()) { Stretch = true, GripStyle = ToolStripGripStyle.Hidden, Dock = DockStyle.Left }; base.Dock = DockStyle.Fill; ToolTabs.ActiveButtonChanged += toolTabs_ActiveButtonChanged; Controls.AddRange(new System.Windows.Forms.Control[] { OkCancelBar, ToolTabs }); controls.Values.ForEach(g => Controls.Add(g)); controls.Values.ForEach(c => c.BringToFront()); ToolTabs.ActiveButton = controls.Keys.First(); }