Exemplo n.º 1
0
        private void newTabToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TabPage        newPage = new TabPage("New Page");
            userControlTab a       = new userControlTab();

            a.Dock = DockStyle.Fill;
            tabControl1.TabPages.Add(newPage);
            newPage.Controls.Add(a);
            tabControl1.SelectedTab = newPage;
        }
Exemplo n.º 2
0
 //Control T for New Tab
 private void mainForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.T)
     {
         TabPage        newPage = new TabPage("New Page");
         userControlTab a       = new userControlTab();
         a.Dock = DockStyle.Fill;
         tabControl1.TabPages.Add(newPage);
         newPage.Controls.Add(a);
         tabControl1.SelectedTab = newPage;
     }
 }