DataGridViewRow.DrawFocus(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, DataGridViewCellStyle, Boolean) Método
Definición
Dibuja un rectángulo de foco alrededor de los límites especificados.Draws a focus rectangle around the specified bounds.
protected public:
virtual void DrawFocus(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle bounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates rowState, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, bool cellsPaintSelectionBackground);
protected internal virtual void DrawFocus (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle bounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, System.Windows.Forms.DataGridViewCellStyle cellStyle, bool cellsPaintSelectionBackground);
abstract member DrawFocus : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * System.Windows.Forms.DataGridViewCellStyle * bool -> unit
override this.DrawFocus : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * System.Windows.Forms.DataGridViewCellStyle * bool -> 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.
- bounds
- 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.
- cellStyle
- DataGridViewCellStyle
DataGridViewCellStyle que se utiliza para dibujar el rectángulo de foco.The DataGridViewCellStyle used to paint the focus rectangle.
- cellsPaintSelectionBackground
- Boolean
true
para utilizar el valor de la propiedad SelectionBackColor de cellStyle
como color del rectángulo de foco; false
para usar el valor de la propiedad BackColor de cellStyle
como color del rectángulo de foco.true
to use the SelectionBackColor property of cellStyle
as the color of the focus rectangle; false
to use the BackColor property of cellStyle
as the color of the focus rectangle.
Excepciones
La fila no se ha agregado a un control DataGridView.The row has not been added to a DataGridView control.
graphics
es null
.graphics
is null
.
o bien-or-
cellStyle
es null
.cellStyle
is null
.
Comentarios
El parámetro rowIndex
no se utiliza en la implementación de la clase base del método DrawFocus, aunque se puede utilizar al reemplazar este método en una clase derivada.The rowIndex
parameter is not used in the base-class implementation of the DrawFocus method, although it can be used when overriding this method in a derived class.