public cnTabControl() { SuspendLayout(); AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; BackColor = System.Drawing.Color.FromArgb(255, 251, 250, 251); ForeColor = System.Drawing.SystemColors.ControlText; Name = "cnTabControl"; Size = new System.Drawing.Size(200, 100); ResumeLayout(); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.UserPaint, true); tabPages = new cnTabPageCollection(this); this.tabPages.ClearComplete += new cnTabPageCollection.ClearCompleteEventHandler(TabPagesClearComplete); this.tabPages.InsertComplete += new cnTabPageCollection.InsertCompleteEventHandler(TabPagesInsertComplete); this.tabPages.RemoveComplete += new cnTabPageCollection.RemoveCompleteEventHandler(TabPagesRemoveComplete); this.tabPages.SetComplete += new cnTabPageCollection.SetCompleteEventHandler(TabPagesSetComplete); tabHeight = 25; tabAlignment = TabAlignment.Top; tabOffsetSel = 3; tabOffsetNormal = 6; borderColor = Color.FromArgb(255, 135, 155, 179); buttonStyles = TabButtonStyles.All; closeButton = false; currentPage = -1; offsetX = 0; tabWidth = 70; tabView = TabControlView.OneNote; tabPathSelected = new GraphicsPath(); tabPathNormal = new GraphicsPath(); hoverEnable = true; hoverPage = -1; textDirection = TabTextDirection.Horizontal; tabRadius = 10; toolTipPage = -1; toolTip = new ToolTip(); toolTip.Active = true; CreateColors(); GenerateTitlePath(); }
/* * /// <summary> * /// Указывает, что процесс создания кнопок не завершен и * /// размещение их функцией RelocationButtons невозможно. * /// </summary> * private bool initProcess = true; * * /// <summary> * /// Номер страницы для которой выдается подсказка * /// </summary> * private int toolTipPage; * * // Подсказка для закладки * private ToolTip toolTip;*/ public NetTabControl() { BackColor = Color.FromArgb(255, 251, 250, 251); ForeColor = SystemColors.ControlText; Size = new Size(200, 100); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.UserPaint, true); this.tabPages = new NetTabPageCollection(this); this.tabPages.ClearComplete += new EventHandler <EventArgs>(this.TabPagesClearComplete); this.tabPages.InsertComplete += new EventHandler <NetTabPageEventArgs>(this.TabPagesInsertComplete); this.tabPages.RemoveComplete += new EventHandler <NetTabPageEventArgs>(this.TabPagesRemoveComplete); this.TabHeight = 25; this.tabAlignment = TabAlignment.Top; this.currentPage = -1; this.tabOffsetSel = 3; this.tabOffsetNormal = 6; this.tabView = TabControlView.OneNote; this.buttonStyles = TabButtonStyles.All; this.closeButton = false; this.textDirection = TabTextDirection.Horizontal; this.offsetX = 0; this.tabWidth = 70; this.tabRadius = 10; this.tabPathSelected = new GraphicsPath(); this.tabPathNormal = new GraphicsPath(); this.hoverEnable = true; this.hoverPage = -1; /*this.toolTipPage = -1; * this.toolTip = new ToolTip(); * this.toolTip.Active = true;*/ this.CreateColors(); }
public NetTabRender(TabControlView view) { this.path = new GraphicsPath(); this.view = view; this.GenerateTabButtonPath(); }