TableLayoutPanelCellBorderStyle TableLayoutPanelCellBorderStyle TableLayoutPanelCellBorderStyle TableLayoutPanelCellBorderStyle Enum

定义

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

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

字段

Inset Inset Inset Inset 2

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

InsetDouble InsetDouble InsetDouble InsetDouble 3

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

None None None None 0

无边框。No borders.

Outset Outset Outset Outset 4

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

OutsetDouble OutsetDouble OutsetDouble OutsetDouble 5

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

OutsetPartial OutsetPartial OutsetPartial OutsetPartial 6

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

Single Single Single Single 1

单行边框。A single-line border.

示例

下面的示例演示如何使用TableLayoutPanelCellBorderStyle枚举来设置CellBorderStyleTableLayoutPanel控件。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

注解

TableLayoutPanelCellBorderStyle枚举表示中的单元格不同的边框样式选项TableLayoutPanelThe 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.

适用于

另请参阅