TableLayoutPanel.CellBorderStyle Property
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.
Gets or sets the style of the cell borders.
public:
property System::Windows::Forms::TableLayoutPanelCellBorderStyle CellBorderStyle { System::Windows::Forms::TableLayoutPanelCellBorderStyle get(); void set(System::Windows::Forms::TableLayoutPanelCellBorderStyle value); };
public System.Windows.Forms.TableLayoutPanelCellBorderStyle CellBorderStyle { get; set; }
member this.CellBorderStyle : System.Windows.Forms.TableLayoutPanelCellBorderStyle with get, set
Public Property CellBorderStyle As TableLayoutPanelCellBorderStyle
One of the TableLayoutPanelCellBorderStyle values describing the style of all the cell borders in the table. The default is None.
.NET 6 and later versions only: The property value is not valid for the enumeration type.
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;
}
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
Setting this value causes the panel to redraw itself and its contents.
Өнім | Нұсқалар |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET кері байланысы
.NET — бастапқы коды ашық жоба. Пікір қалдыру үшін сілтемені таңдаңыз: