DataGridViewRow.PaintHeader(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts) Método

Definición

Dibuja el encabezado de celda de la fila actual.Paints the header cell of the current row.

protected public:
 virtual void PaintHeader(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle rowBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, System::Windows::Forms::DataGridViewPaintParts paintParts);
protected internal virtual void PaintHeader (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle rowBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, System.Windows.Forms.DataGridViewPaintParts paintParts);
abstract member PaintHeader : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool * System.Windows.Forms.DataGridViewPaintParts -> unit
override this.PaintHeader : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool * System.Windows.Forms.DataGridViewPaintParts -> unit

Parámetros

graphics
Graphics

Graphics que se utiliza para dibujar DataGridViewRow.The Graphics used to paint the DataGridViewRow.

clipBounds
Rectangle

Objeto Rectangle que representa el área del control DataGridView que hay que dibujar.A Rectangle that represents the area of the DataGridView that needs to be painted.

rowBounds
Rectangle

Rectangle que contiene los límites de la celda DataGridViewRow que se está dibujando.A Rectangle that contains the bounds of the DataGridViewRow that is being painted.

rowIndex
Int32

Índice de fila de la celda que se está dibujando.The row index of the cell that is being painted.

rowState
DataGridViewElementStates

Combinación bit a bit de valores de DataGridViewElementStates que especifica el estado de la fila.A bitwise combination of DataGridViewElementStates values that specifies the state of the row.

isFirstDisplayedRow
Boolean

true para indicar que la fila actual es la primera que se muestra en DataGridView; de lo contrario, false.true to indicate that the current row is the first row displayed in the DataGridView; otherwise, false.

isLastVisibleRow
Boolean

true para indicar que la fila actual es la última de DataGridView que tiene la propiedad Visible establecida en true; de lo contrario, false.true to indicate that the current row is the last row in the DataGridView that has the Visible property set to true; otherwise, false.

paintParts
DataGridViewPaintParts

Combinación bit a bit de valores de DataGridViewPaintParts que especifica las partes de la celda que hay que dibujar.A bitwise combination of DataGridViewPaintParts values indicating the parts of the cells to paint.

Excepciones

La fila no se ha agregado a un control DataGridView.The row has not been added to a DataGridView control.

paintParts no es una combinación bit a bit válida de valores de DataGridViewPaintParts.paintParts in not a valid bitwise combination of DataGridViewPaintParts values.

Comentarios

El control DataGridView llama a este método para pintar el encabezado de fila excepto cuando un controlador para el evento DataGridView.RowPrePaint establece la propiedad HandledEventArgs.Handled en true.The DataGridView control calls this method to paint the row header except when a handler for the DataGridView.RowPrePaint event sets the HandledEventArgs.Handled property to true. Para obtener más información, vea Paint.For more information, see Paint.

Se aplica a

Consulte también: