TableLayoutPanelCellBorderStyle 枚举

定义

指定表布局控件中单元格的边框样式。Specifies the border style of a cell in a table layout control.

public enum class TableLayoutPanelCellBorderStyle
public enum TableLayoutPanelCellBorderStyle
type TableLayoutPanelCellBorderStyle = 
Public Enum TableLayoutPanelCellBorderStyle
继承
TableLayoutPanelCellBorderStyle

字段

Inset 2

单线凹陷边框。A single-line sunken border.

InsetDouble 3

双线凹陷边框。A double-line sunken border.

None 0

无边框。No borders.

Outset 4

单线凸起边框。A single-line raised border.

OutsetDouble 5

双线凸起边框。A double-line raised border.

OutsetPartial 6

包含凸起部分的单线边框。A single-line border containing a raised portion.

Single 1

单行边框。A single-line border.

示例

下面的示例演示如何使用TableLayoutPanelCellBorderStyle枚举为TableLayoutPanel控件CellBorderStyle设置。The following example shows how to use the TableLayoutPanelCellBorderStyle enumeration to set the CellBorderStyle for a TableLayoutPanel control. 此代码示例是为TableLayoutPanel控件提供的更大示例的一部分。This code example is part of a larger example provided for the TableLayoutPanel control.

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

注解

枚举表示中的单元格的不同边框样式选项。 TableLayoutPanel TableLayoutPanelCellBorderStyleThe TableLayoutPanelCellBorderStyle enumeration represents the different border style options for a cell in a TableLayoutPanel. 每个样式的单元格边框的宽度由TableLayoutPanel类确定。The width of the cell border for each style is determined by the TableLayoutPanel class. 边框的空间取自TableLayoutPanel控件的。 DisplayRectangleThe space for the border is taken from the TableLayoutPanel control's DisplayRectangle.

适用于

另请参阅