internal int AddTabPage(TabPage tabPage) { var pageButton = new TabPageButton(this, tabPageCount); pageButton.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; pageButton.adjustWidthToText = buttonAdjustSize; pageButton.uwfBorderHoverColor = Color.Transparent; pageButton.uwfBorderColor = Color.Transparent; pageButton.Location = new Point(tabPageCount * pageButton.Width - tabPageCount, 0); pageButton.Size = itemSize; pageButton.Text = tabPage.Text; pageButton.textPadding = buttonTextPadding; pageButton.Hide(); pagesButtonsPanel.Controls.Add(pageButton); pagesButtons.Add(pageButton); tabPageCount++; if (TabPages.Count > 0 && SelectedIndex == -1) { SelectTab(0); } UpdateButtons(); return(tabPageCount); }
internal int AddTabPage(TabPage tabPage) { TabPageButton pageButton = new TabPageButton(this, tabPageCount); pageButton.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; pageButton.BorderHoverColor = Color.Transparent; pageButton.BorderColor = Color.Transparent; pageButton.Location = new Point(tabPageCount * pageButton.Width - tabPageCount, 0); pageButton.Height = ItemSize.Height; pageButton.Text = tabPage.Text; pageButton.Hide(); pagesButtonsPanel.Controls.Add(pageButton); pagesButtons.Add(pageButton); tabPageCount++; if (TabPages.Count > 0 && SelectedIndex == -1) { SelectTab(0); } return(tabPageCount); }
internal int AddTabPage(TabPage tabPage) { TabPageButton pageButton = new TabPageButton(this, tabPageCount); pageButton.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; pageButton.BorderHoverColor = Color.Transparent; pageButton.BorderColor = Color.Transparent; pageButton.Location = new Point(tabPageCount * pageButton.Width - tabPageCount, 0); pageButton.Height = ItemSize.Height; pageButton.Text = tabPage.Text; pageButton.Hide(); pagesButtonsPanel.Controls.Add(pageButton); pagesButtons.Add(pageButton); tabPageCount++; if (TabPages.Count > 0 && SelectedIndex == -1) SelectTab(0); return tabPageCount; }