Export (0) Print
Expand All

TableLayoutPanel.CellBorderStyle Property

Gets or sets the style of the cell borders.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

[LocalizableAttribute(true)] 
public TableLayoutPanelCellBorderStyle CellBorderStyle { get; set; }
/** @property */
public TableLayoutPanelCellBorderStyle get_CellBorderStyle ()

/** @property */
public void set_CellBorderStyle (TableLayoutPanelCellBorderStyle value)

public function get CellBorderStyle () : TableLayoutPanelCellBorderStyle

public function set CellBorderStyle (value : TableLayoutPanelCellBorderStyle)

Not applicable.

Property Value

One of the TableLayoutPanelCellBorderStyle values describing the style of all the cell borders in the table. The default is None.

Setting this value will cause the panel to redraw itself and its contents.

The following code example sets the value of the BorderStyle property depending on the selected RadioButton.

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft