DataGridViewRow.DrawFocus Metodo

Definizione

Disegna un rettangolo dello stato attivo intorno ai limiti specificati.

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
Protected Friend Overridable Sub DrawFocus (graphics As Graphics, clipBounds As Rectangle, bounds As Rectangle, rowIndex As Integer, rowState As DataGridViewElementStates, cellStyle As DataGridViewCellStyle, cellsPaintSelectionBackground As Boolean)

Parametri

graphics
Graphics

Oggetto Graphics utilizzato per disegnare l'oggetto DataGridViewRow.

clipBounds
Rectangle

Oggetto Rectangle che rappresenta l'area dell'oggetto DataGridView da disegnare.

bounds
Rectangle

Oggetto Rectangle contenente i limiti dell'oggetto DataGridViewRow da disegnare.

rowIndex
Int32

Indice di riga della cella da disegnare.

rowState
DataGridViewElementStates

Combinazione bit per bit di DataGridViewElementStates valori che specifica lo stato della riga.

cellStyle
DataGridViewCellStyle

Oggetto DataGridViewCellStyle utilizzato per disegnare il rettangolo dello stato attivo.

cellsPaintSelectionBackground
Boolean

true per utilizzare la SelectionBackColor proprietà di cellStyle come colore del rettangolo di attivazione; false per utilizzare la BackColor proprietà di cellStyle come colore del rettangolo di messa a fuoco.

Eccezioni

La riga non è stata aggiunta a un DataGridView controllo .

graphics è null.

oppure

cellStyle è null.

Commenti

Il rowIndex parametro non viene usato nell'implementazione della classe base del DrawFocus metodo , anche se può essere usato quando si esegue l'override di questo metodo in una classe derivata.

Si applica a

Vedi anche