VS.NET(C#)-3.1_Label控件
Label控件
Label控件是最常用的控件。
常用属性(VS2005)
名称 | 类型 | 值 | 说明 |
Text |
|
| 设置或返回标签控件中显示的文本 |
BackColor |
|
| 获取或设置控件的背景色 |
BorderStyle |
|
| 设置或返回边框 |
Enabled |
|
| 值为 true 时允许使用控件,值为 false 时禁止使用控件 |
TabIndex |
|
| 设置或返回对象的Tab键顺序 |
常见事件
protected void Label1_Init(objectsender, EventArgs e)
{
//编辑代码
Label1.BorderStyle = BorderStyle.Solid;
}