Sdílet prostřednictvím


DataGridViewRow.DrawFocus Metoda

Definice

Nakreslí obdélník fokusu kolem zadaných hranic.

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)

Parametry

graphics
Graphics

Použité Graphics k malování DataGridViewRow.

clipBounds
Rectangle

A Rectangle , který představuje oblast DataGridView , která musí být malována.

bounds
Rectangle

A Rectangle obsahující hranice DataGridViewRow , které se malují.

rowIndex
Int32

Index řádku buňky, která se maluje.

rowState
DataGridViewElementStates

Bitové kombinace DataGridViewElementStates hodnot, které určují stav řádku.

cellStyle
DataGridViewCellStyle

Používá DataGridViewCellStyle se k vykreslení obdélníku fokusu.

cellsPaintSelectionBackground
Boolean

true použít SelectionBackColor vlastnost cellStyle jako barvu obdélníku fokusu; false použít BackColor vlastnost cellStyle jako barvu obdélníku fokusu.

Výjimky

Řádek nebyl přidán do DataGridView ovládacího prvku.

graphics je null.

-nebo- cellStyle je null.

Poznámky

Parametr rowIndex se nepoužívá v implementaci DrawFocus metody základní třídy, i když ji lze použít při přepsání této metody v odvozené třídě.

Platí pro

Viz také