Compartir a través de


DataGridViewHeaderCell.Paint Método

Definición

Pinta el objeto DataGridViewHeaderCell actual.

protected:
 override void Paint(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates dataGridViewElementState, System::Object ^ value, System::Object ^ formattedValue, System::String ^ errorText, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ advancedBorderStyle, System::Windows::Forms::DataGridViewPaintParts paintParts);
protected override void Paint (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates dataGridViewElementState, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
protected override void Paint (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates dataGridViewElementState, object? value, object? formattedValue, string? errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
override this.Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * obj * obj * string * System.Windows.Forms.DataGridViewCellStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewPaintParts -> unit
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)

Parámetros

graphics
Graphics

Clase Graphics usada para dibujar la celda.

clipBounds
Rectangle

Rectangle que representa el área de DataGridView que se debe volver a pintar.

cellBounds
Rectangle

Objeto Rectangle que contiene los límites de la celda que se está dibujando.

rowIndex
Int32

Índice de fila de la celda que se está dibujando.

dataGridViewElementState
DataGridViewElementStates

Combinación bit a bit de valores DataGridViewElementStates que especifica el estado de la celda.

value
Object

Datos de la celda que se está dibujando.

formattedValue
Object

Datos con formato de la celda que se está dibujando.

errorText
String

Mensaje de error asociado a la celda.

cellStyle
DataGridViewCellStyle

Clase DataGridViewCellStyle que contiene información de estilo y formato sobre la celda.

advancedBorderStyle
DataGridViewAdvancedBorderStyle

DataGridViewAdvancedBorderStyle que contiene los estilos de borde para la celda que se está pintando.

paintParts
DataGridViewPaintParts

Combinación bit a bit de los valores DataGridViewPaintParts que especifica las partes de la celda que se deben pintar.

Se aplica a