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

Definición

Dibuja las celdas de la fila actual.Paints the cells in the current row.

protected public:
 virtual void PaintCells(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 PaintCells (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 PaintCells : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool * System.Windows.Forms.DataGridViewPaintParts -> unit
override this.PaintCells : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool * System.Windows.Forms.DataGridViewPaintParts -> unit
Protected Friend Overridable Sub PaintCells (graphics As Graphics, clipBounds As Rectangle, rowBounds As Rectangle, rowIndex As Integer, rowState As DataGridViewElementStates, isFirstDisplayedRow As Boolean, isLastVisibleRow As Boolean, paintParts As DataGridViewPaintParts)

Parámetros

graphics
Graphics

Graphics que se usa para pintar 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á pintando.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 si la fila actual es la primera que se muestra en DataGridView; de lo contrario, false.true to indicate whether the current row is the first row displayed in the DataGridView; otherwise, false.

isLastVisibleRow
Boolean

true para indicar si la fila actual es la última de DataGridView que tiene la propiedad Visible establecida en true; de lo contrario, false.true to indicate whether 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 DataGridView control llama a este método para pintar las celdas de la fila excepto cuando un controlador para el DataGridView.RowPrePaint evento establece la HandledEventArgs.Handled propiedad en true .The DataGridView control calls this method to paint the cells in the row except when a handler for the DataGridView.RowPrePaint event sets the HandledEventArgs.Handled property to true. Para más información, consulte Paint.For more information, see Paint.

Se aplica a

Consulte también