DataGridViewCell::PaintBorder Method (Graphics^, Rectangle, Rectangle, DataGridViewCellStyle^, DataGridViewAdvancedBorderStyle^)

 

Paints the border of the current DataGridViewCell.

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

protected:
virtual void PaintBorder(
	Graphics^ graphics,
	Rectangle clipBounds,
	Rectangle bounds,
	DataGridViewCellStyle^ cellStyle,
	DataGridViewAdvancedBorderStyle^ advancedBorderStyle
)

Parameters

graphics
Type: System.Drawing::Graphics^

The Graphics used to paint the border.

clipBounds
Type: System.Drawing::Rectangle

A Rectangle that represents the area of the DataGridView that needs to be repainted.

bounds
Type: System.Drawing::Rectangle

A Rectangle that contains the area of the border that is being painted.

cellStyle
Type: System.Windows.Forms::DataGridViewCellStyle^

A DataGridViewCellStyle that contains formatting and style information about the current cell.

advancedBorderStyle
Type: System.Windows.Forms::DataGridViewAdvancedBorderStyle^

A DataGridViewAdvancedBorderStyle that contains border styles of the border that is being painted.

The following code example illustrates the use of this method. This example is part of a larger example available in How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: