Using System;
Using System.Collections.Generic;
Using System.ComponentModel;
Using System.Data;
Using System.Drawing;
Using System.Linq;
Using System.Text;
Using System.Windows.Forms;
Namespace UItest
{
public partial class Form1:form
{
Private ReadOnly TabControl tabControl1;
Public Form1 ()
{
TabControl1 = new TabControl ();
Tabcontrol1.parent = this;
var tabpage = new TabPage ();
TabPage. Text = "page";
TABCONTROL1.TABPAGES.ADD (TabPage);
TABCONTROL1.TABPAGES.ADD (TabPage);
Tabcontrol1.dock = DockStyle.Fill;
Registering a response function
tabcontrol1.selected + = new System.Windows.Forms.TabControlEventHandler (tabcontrol1_selected);
InitializeComponent ();
}
private void Tabcontrol1_selected (object sender, TabControlEventArgs e)
{
if (tabcontrol1.tabcount-1 = = E.tabpageindex)
{
TABCONTROL1.TABPAGES.ADD (E.tabpage.text);
E.tabpage.text = "Options" + e.tabpageindex;
}
}
}
}
C # Manually add response functions