Επεξεργασία

Κοινή χρήση μέσω


TableLayoutPanelCellBorderStyle Enum

Definition

Specifies the border style of a cell in a table layout control.

public enum class TableLayoutPanelCellBorderStyle
public enum TableLayoutPanelCellBorderStyle
type TableLayoutPanelCellBorderStyle = 
Public Enum TableLayoutPanelCellBorderStyle
Inheritance
TableLayoutPanelCellBorderStyle

Fields

Name Value Description
None 0

No borders.

Single 1

A single-line border.

Inset 2

A single-line sunken border.

InsetDouble 3

A double-line sunken border.

Outset 4

A single-line raised border.

OutsetDouble 5

A double-line raised border.

OutsetPartial 6

A single-line border containing a raised portion.

Examples

The following example shows how to use the TableLayoutPanelCellBorderStyle enumeration to set the CellBorderStyle for a TableLayoutPanel control. 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

Remarks

The TableLayoutPanelCellBorderStyle enumeration represents the different border style options for a cell in a TableLayoutPanel. The width of the cell border for each style is determined by the TableLayoutPanel class. The space for the border is taken from the TableLayoutPanel control's DisplayRectangle.

Applies to

See also