Share via


DataGridViewCheckBoxHeaderCell.Paint Method

Paints the current DataGridViewCell.

Namespace:  Microsoft.SqlServer.Management.Controls
Assembly:  Microsoft.SqlServer.Management.Controls (in Microsoft.SqlServer.Management.Controls.dll)

Syntax

'Declaration
Protected Overrides Sub Paint ( _
    graphics As Graphics, _
    clipBounds As Rectangle, _
    cellBounds As Rectangle, _
    rowIndex As Integer, _
    dataGridViewElementState As DataGridViewElementStates, _
    value As Object, _
    formattedValue As Object, _
    errorText As String, _
    cellStyle As DataGridViewCellStyle, _
    advancedBorderStyle As DataGridViewAdvancedBorderStyle, _
    paintParts As DataGridViewPaintParts _
)
'Usage
Dim graphics As Graphics
Dim clipBounds As Rectangle
Dim cellBounds As Rectangle
Dim rowIndex As Integer
Dim dataGridViewElementState As DataGridViewElementStates
Dim value As Object
Dim formattedValue As Object
Dim errorText As String
Dim cellStyle As DataGridViewCellStyle
Dim advancedBorderStyle As DataGridViewAdvancedBorderStyle
Dim paintParts As DataGridViewPaintParts

Me.Paint(graphics, clipBounds, cellBounds, _
    rowIndex, dataGridViewElementState, _
    value, formattedValue, errorText, _
    cellStyle, advancedBorderStyle, _
    paintParts)
protected override void Paint(
    Graphics graphics,
    Rectangle clipBounds,
    Rectangle cellBounds,
    int rowIndex,
    DataGridViewElementStates dataGridViewElementState,
    Object value,
    Object formattedValue,
    string errorText,
    DataGridViewCellStyle cellStyle,
    DataGridViewAdvancedBorderStyle advancedBorderStyle,
    DataGridViewPaintParts paintParts
)
protected:
virtual void Paint(
    Graphics^ graphics, 
    Rectangle clipBounds, 
    Rectangle cellBounds, 
    int rowIndex, 
    DataGridViewElementStates dataGridViewElementState, 
    Object^ value, 
    Object^ formattedValue, 
    String^ errorText, 
    DataGridViewCellStyle^ cellStyle, 
    DataGridViewAdvancedBorderStyle^ advancedBorderStyle, 
    DataGridViewPaintParts paintParts
) override
abstract Paint : 
        graphics:Graphics * 
        clipBounds:Rectangle * 
        cellBounds:Rectangle * 
        rowIndex:int * 
        dataGridViewElementState:DataGridViewElementStates * 
        value:Object * 
        formattedValue:Object * 
        errorText:string * 
        cellStyle:DataGridViewCellStyle * 
        advancedBorderStyle:DataGridViewAdvancedBorderStyle * 
        paintParts:DataGridViewPaintParts -> unit 
override Paint : 
        graphics:Graphics * 
        clipBounds:Rectangle * 
        cellBounds:Rectangle * 
        rowIndex:int * 
        dataGridViewElementState:DataGridViewElementStates * 
        value:Object * 
        formattedValue:Object * 
        errorText:string * 
        cellStyle:DataGridViewCellStyle * 
        advancedBorderStyle:DataGridViewAdvancedBorderStyle * 
        paintParts:DataGridViewPaintParts -> unit 
protected override function Paint(
    graphics : Graphics, 
    clipBounds : Rectangle, 
    cellBounds : Rectangle, 
    rowIndex : int, 
    dataGridViewElementState : DataGridViewElementStates, 
    value : Object, 
    formattedValue : Object, 
    errorText : String, 
    cellStyle : DataGridViewCellStyle, 
    advancedBorderStyle : DataGridViewAdvancedBorderStyle, 
    paintParts : DataGridViewPaintParts
)

Parameters

  • clipBounds
    Type: System.Drawing.Rectangle
    A rectangle that represents the area of the DataGridView that needs to be repainted.
  • cellBounds
    Type: System.Drawing.Rectangle
    A Rectangle that contains the bounds of the DataGridViewCell that is being painted.
  • rowIndex
    Type: System.Int32
    The row index of the cell that is being painted.
  • value
    Type: System.Object
    The data of the DataGridViewCell that is being painted.
  • formattedValue
    Type: System.Object
    The formatted data of the DataGridViewCell that is being painted.
  • errorText
    Type: System.String
    An error message that is associated with the cell.