TableLayoutPanelCellBorderStyle Enumeration
TOC
Collapse the table of content
Expand the table of content

TableLayoutPanelCellBorderStyle Enumeration

 

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

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public enum TableLayoutPanelCellBorderStyle

Member nameDescription
Inset

A single-line sunken border.

InsetDouble

A double-line sunken border.

None

No borders.

Outset

A single-line raised border.

OutsetDouble

A double-line raised border.

OutsetPartial

A single-line border containing a raised portion.

Single

A single-line border.

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.

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;
  }

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft