public void AddInputTab() { if (tabControlInput.TabPages.Count == MaxNumberOfInputTabPages) { return; } TabPage newInputTabPage = new TabPage(); newInputTabPage.Name = ""; TextBoxControl textBoxControl = new TextBoxControl(); textBoxControl.Name = string.Concat("textBoxControlInput1", tabControlInput.TabPages.Count); newInputTabPage.Controls.Add(textBoxControl); textBoxControl.Dock = DockStyle.Fill; textBoxControl.Margin = new Padding(3); newInputTabPage.Padding = new Padding(3); tabControlInput.TabPages.Add(newInputTabPage); RenumberInputTabPages(); tabControlInput.SelectedTab = newInputTabPage; }
private int GetLineCount(TextBoxControl textBox) { return(textBox.Lines.Length); }