public void AddTab(string tabName, SuperTabControlPanel tabPanel) { SuperTabControl tabControl = this.SuperTabControl1; if (tabControl == null) { throw new Exception("无法找到SuperTabControl。"); } tabControl.SuspendLayout(); SuperTabItem tabItem = new SuperTabItem(); tabControl.Controls.Add(tabPanel); tabControl.Tabs.Add(tabItem); tabPanel.TabItem = tabItem; tabItem.Text = tabName; tabItem.AttachedControl = tabPanel; tabControl.ResumeLayout(false); }