[英]how to change the name of the tabcontrol
(Collection)
.(Collection)
之后的...。tabPage
properties associated with it.tabPage
关联的任何tabPage
属性。You can change it pretty simply in the designer;您可以在设计器中非常简单地更改它; click on a blank area in the tab page contents and use the property view to set the
Text
property.点击标签页内容中的空白区域,使用属性视图设置
Text
属性。 Also through code via:也通过代码通过:
tabPage1.Text = @"Something Meaningful";
Where tabPage1
would be the reference to whichever TabPage
you wanted to set the Text
of.其中
tabPage1
将是对您想要设置Text
的任何TabPage
的引用。
tabCtrl.TabPages[0].Text = "some text";
tabCtrl.TabPages[1].Text = "some other text";
Going into the designer.cs you can change the tab Text like so this.tabPage3.Text = 'Your Title'
进入designer.cs ,您可以像这样更改标签文本
this.tabPage3.Text = 'Your Title'
Method方法
//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
...
}
It will auto refresh the Design view.它将自动刷新设计视图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.