TableLayoutPanelCellBorderStyle 枚举
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定表布局控件中单元格的边框样式。
public enum class TableLayoutPanelCellBorderStyle
C#
public enum TableLayoutPanelCellBorderStyle
type TableLayoutPanelCellBorderStyle =
Public Enum TableLayoutPanelCellBorderStyle
- 继承
Inset | 2 | 单线凹陷边框。 |
InsetDouble | 3 | 双线凹陷边框。 |
None | 0 | 无边框。 |
Outset | 4 | 单线凸起边框。 |
OutsetDouble | 5 | 双线凸起边框。 |
OutsetPartial | 6 | 包含凸起部分的单线边框。 |
Single | 1 | 单行边框。 |
下面的示例演示如何使用TableLayoutPanelCellBorderStyle枚举设置CellBorderStyleTableLayoutPanel控件的枚举。 此代码示例是为控件提供的大型示例的 TableLayoutPanel 一部分。
C#
private void borderStyleOutsetRadioBtn_CheckedChanged(
System.Object sender,
System.EventArgs e)
{
this.TableLayoutPanel1.CellBorderStyle =
TableLayoutPanelCellBorderStyle.Outset;
}
private void borderStyleNoneRadioBtn_CheckedChanged(
System.Object sender,
System.EventArgs e)
{
this.TableLayoutPanel1.CellBorderStyle =
TableLayoutPanelCellBorderStyle.None;
}
private void borderStyleInsetRadioBtn_CheckedChanged(
System.Object sender,
System.EventArgs e)
{
this.TableLayoutPanel1.CellBorderStyle =
TableLayoutPanelCellBorderStyle.Inset;
}
Private Sub borderStyleOutsetRadioBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles borderStyleOutsetRadioBtn.CheckedChanged
Me.TableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.Outset
End Sub
Private Sub borderStyleNoneRadioBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles borderStyleNoneRadioBtn.CheckedChanged
Me.TableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.None
End Sub
Private Sub borderStyleInsetRadioBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles borderStyleInsetRadioBtn.CheckedChanged
Me.TableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset
End Sub
枚举 TableLayoutPanelCellBorderStyle 表示单元格的不同 TableLayoutPanel边框样式选项。 每个样式的单元格边框的宽度由 TableLayoutPanel 类决定。 边框的空间取自 TableLayoutPanel 控件的空间 DisplayRectangle。
产品 | 版本 |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |