/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this._tabControl = new SharpClient.UI.Controls.TabControl(); this._panelTop = new System.Windows.Forms.Panel(); this._panelBottom = new System.Windows.Forms.Panel(); this._buttonUpdate = new System.Windows.Forms.Button(); this._buttonBack = new System.Windows.Forms.Button(); this._buttonNext = new System.Windows.Forms.Button(); this._buttonCancel = new System.Windows.Forms.Button(); this._buttonFinish = new System.Windows.Forms.Button(); this._buttonClose = new System.Windows.Forms.Button(); this._buttonHelp = new System.Windows.Forms.Button(); this._panelBottom.SuspendLayout(); this.SuspendLayout(); // // _tabControl // this._tabControl.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right); this._tabControl.Appearance = SharpClient.UI.Controls.TabControl.VisualAppearance.MultiDocument; this._tabControl.IDEPixelBorder = false; this._tabControl.Location = new System.Drawing.Point(0, 80); this._tabControl.Multiline = true; this._tabControl.MultilineFullWidth = true; this._tabControl.Name = "_tabControl"; this._tabControl.ShowArrows = false; this._tabControl.ShowClose = false; this._tabControl.Size = new System.Drawing.Size(424, 264); this._tabControl.TabIndex = 0; // // _panelTop // this._panelTop.BackColor = System.Drawing.SystemColors.Window; this._panelTop.Dock = System.Windows.Forms.DockStyle.Top; this._panelTop.Name = "_panelTop"; this._panelTop.Size = new System.Drawing.Size(424, 80); this._panelTop.TabIndex = 1; // // _panelBottom // this._panelBottom.Controls.AddRange(new System.Windows.Forms.Control[] { this._buttonUpdate, this._buttonBack, this._buttonNext, this._buttonCancel, this._buttonFinish, this._buttonClose, this._buttonHelp}); this._panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; this._panelBottom.Location = new System.Drawing.Point(0, 344); this._panelBottom.Name = "_panelBottom"; this._panelBottom.Size = new System.Drawing.Size(424, 48); this._panelBottom.TabIndex = 2; // // _buttonUpdate // this._buttonUpdate.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right); this._buttonUpdate.Location = new System.Drawing.Point(8, 14); this._buttonUpdate.Name = "_buttonUpdate"; this._buttonUpdate.TabIndex = 4; this._buttonUpdate.Text = "Update"; this._buttonUpdate.Click += new System.EventHandler(this.OnButtonUpdate); // // _buttonBack // this._buttonBack.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right); this._buttonBack.Location = new System.Drawing.Point(56, 14); this._buttonBack.Name = "_buttonBack"; this._buttonBack.TabIndex = 3; this._buttonBack.Text = "< Back"; this._buttonBack.Click += new System.EventHandler(this.OnButtonBack); // // _buttonNext // this._buttonNext.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right); this._buttonNext.Location = new System.Drawing.Point(120, 14); this._buttonNext.Name = "_buttonNext"; this._buttonNext.TabIndex = 2; this._buttonNext.Text = "Next >"; this._buttonNext.Click += new System.EventHandler(this.OnButtonNext); // // _buttonCancel // this._buttonCancel.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right); this._buttonCancel.Location = new System.Drawing.Point(184, 14); this._buttonCancel.Name = "_buttonCancel"; this._buttonCancel.TabIndex = 1; this._buttonCancel.Text = "Cancel"; this._buttonCancel.Click += new System.EventHandler(this.OnButtonCancel); // // _buttonFinish // this._buttonFinish.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right); this._buttonFinish.Location = new System.Drawing.Point(248, 14); this._buttonFinish.Name = "_buttonFinish"; this._buttonFinish.TabIndex = 0; this._buttonFinish.Text = "Finish"; this._buttonFinish.Click += new System.EventHandler(this.OnButtonFinish); // // _buttonClose // this._buttonClose.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right); this._buttonClose.Location = new System.Drawing.Point(304, 14); this._buttonClose.Name = "_buttonClose"; this._buttonClose.TabIndex = 0; this._buttonClose.Text = "Close"; this._buttonClose.Click += new System.EventHandler(this.OnButtonClose); // // _buttonHelp // this._buttonHelp.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right); this._buttonHelp.Location = new System.Drawing.Point(360, 14); this._buttonHelp.Name = "_buttonHelp"; this._buttonHelp.TabIndex = 0; this._buttonHelp.Text = "Help"; this._buttonHelp.Click += new System.EventHandler(this.OnButtonHelp); // // WizardControl // this.Controls.AddRange(new System.Windows.Forms.Control[] { this._tabControl, this._panelTop, this._panelBottom}); this.Name = "WizardControl"; this.Size = new System.Drawing.Size(424, 392); this._panelBottom.ResumeLayout(false); this.ResumeLayout(false); }
public WindowContentTabbed(DockingManager manager, VisualStyle vs) : base(manager, vs) { _redocker = null; _activeContent = null; // Create the TabControl used for viewing the Content windows _tabControl = new SharpClient.UI.Controls.TabControl(); // It should always occupy the remaining space after all details _tabControl.Dock = DockStyle.Fill; // Show tabs only if two or more tab pages exist _tabControl.HideTabsMode = SharpClient.UI.Controls.TabControl.HideTabsModes.HideUsingLogic; // Hook into the TabControl notifications _tabControl.GotFocus += new EventHandler(OnTabControlGotFocus); _tabControl.LostFocus += new EventHandler(OnTabControlLostFocus); _tabControl.PageGotFocus += new EventHandler(OnTabControlGotFocus); _tabControl.PageLostFocus += new EventHandler(OnTabControlLostFocus); _tabControl.SelectionChanged += new EventHandler(OnSelectionChanged); _tabControl.PageDragStart += new MouseEventHandler(OnPageDragStart); _tabControl.PageDragMove += new MouseEventHandler(OnPageDragMove); _tabControl.PageDragEnd += new MouseEventHandler(OnPageDragEnd); _tabControl.PageDragQuit += new MouseEventHandler(OnPageDragQuit); _tabControl.DoubleClickTab += new SharpClient.UI.Controls.TabControl.DoubleClickTabHandler(OnDoubleClickTab); //_tabControl.Font = manager.TabControlFont; _tabControl.BackColor = manager.BackColor; _tabControl.ForeColor = manager.InactiveTextColor; // Define the visual style required _tabControl.Style = vs; // Allow developers a chance to override default settings //manager.OnTabControlCreated(_tabControl); switch(vs) { case VisualStyle.IDE: Controls.Add(_tabControl); break; case VisualStyle.Plain: // Only the border at the pages edge and not around the whole control _tabControl.InsetBorderPagesOnly = !_manager.PlainTabBorder; // We want a border around the TabControl so it is indented and looks consistent // with the Plain look and feel, so use the helper Control 'BorderForControl' BorderForControl bfc = new BorderForControl(_tabControl, _plainBorder); // It should always occupy the remaining space after all details bfc.Dock = DockStyle.Fill; // Define the default border border bfc.BackColor = _manager.BackColor; // When in 'VisualStyle.Plain' we need to Controls.Add(bfc); break; } // Need to hook into message pump so that the ESCAPE key can be // intercepted when in redocking mode Application.AddMessageFilter(this); }