private void TabController_DoubleClick(object sender, EventArgs e) { var dialog = new TextMessageBox(); dialog.ShowDialog(); var tab = this.TabController.SelectedTab; tab.Name = dialog.Input.Text; tab.Text = dialog.Input.Text; }
/// <summary> /// Creates new tab with separate table. /// </summary> private void NewTabToolStripMenuItem_Click(object sender, EventArgs e) { var dialog = new TextMessageBox(); dialog.ShowDialog(); var frm = new Main(); var tab = frm.DataTab; tab.Width = 188; tab.Height = 88; var pg = new TabPage { Name = dialog.Input.Text, Text = dialog.Input.Text }; pg.BackColor = Color.White; pg.Controls.Add(tab); TabController.TabPages.Add(pg); }