Version

Paint Method

Paints the current DataGridViewCell.
Syntax
'Declaration
 
Protected Overrides Sub Paint( _
   ByVal graphics As Graphics, _
   ByVal clipBounds As Rectangle, _
   ByVal cellBounds As Rectangle, _
   ByVal rowIndex As Integer, _
   ByVal cellState As DataGridViewElementStates, _
   ByVal value As Object, _
   ByVal formattedValue As Object, _
   ByVal errorText As String, _
   ByVal cellStyle As DataGridViewCellStyle, _
   ByVal advancedBorderStyle As DataGridViewAdvancedBorderStyle, _
   ByVal paintParts As DataGridViewPaintParts _
) 

Parameters

graphics
The Graphics used to paint the DataGridViewCell.
clipBounds
A Rectangle that represents the area of the DataGridView that needs to be repainted.
cellBounds
A Rectangle that contains the bounds of the DataGridViewCell that is being painted.
rowIndex
The row index of the cell that is being painted.
cellState
A bitwise combination of the DataGridViewElementState values.
value
The data of the DataGridViewCell that is being painted.
formattedValue
The formatted data of the DataGridViewCell that is being painted.
errorText
An error message that is associated with the cell.
cellStyle
A DataGridViewCellStyle that contains formatting and style information about the cell.
advancedBorderStyle
A DataGridViewAdvancedBorderStyle that contains border styles for the cell that is being painted.
paintParts
Determines which parts of the cell to paint.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also