[英]how to change the name of the tabcontrol
您可以在設計器中非常簡單地更改它; 點擊標簽頁內容中的空白區域,使用屬性視圖設置Text
屬性。 也通過代碼通過:
tabPage1.Text = @"Something Meaningful";
其中tabPage1
將是對您想要設置Text
的任何TabPage
的引用。
tabCtrl.TabPages[0].Text = "some text";
tabCtrl.TabPages[1].Text = "some other text";
進入designer.cs ,您可以像這樣更改標簽文本this.tabPage3.Text = 'Your Title'
方法
//Component Designer generated code
private void InitializeComponent()
{
...
this.tabControl1 = new System.Windows.Forms.TabControl();
...
//
// tabPage3
//
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
...
this.tabPage3.Text = "tabPage3";//change the tab name
...
}
它將自動刷新設計視圖。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.