TableLayoutPanelCellBorderStyle Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Fields
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. |
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈