Language

DataGridViewRow.DrawFocus メソッド

定義

指定した境界の周囲にフォーカスの四角形を描画します。

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)

パラメーター

graphics
Graphics

Graphicsの描画に使用するDataGridViewRow。

clipBounds
Rectangle

塗りつぶす必要があるRectangleの領域を表すDataGridView。

bounds
Rectangle

描画中のRectangleの境界を含むDataGridViewRow。

rowIndex
Int32

描画中のセルの行インデックス。

rowState
DataGridViewElementStates

行の状態を指定する DataGridViewElementStates 値のビットごとの組み合わせ。

cellStyle
DataGridViewCellStyle

フォーカスの四角形の描画に使用する DataGridViewCellStyle 。

cellsPaintSelectionBackground
Boolean

true SelectionBackColorのcellStyleプロパティをフォーカス四角形の色として使用する場合は a0/>。フォーカス四角形の色としてfalseのBackColor プロパティを使用するcellStyle。

例外

行が DataGridView コントロールに追加されていません。

graphics は nullです。

-又は-

cellStyle は nullです。

注釈

rowIndex パラメーターは、DrawFocus メソッドの基底クラスの実装では使用されませんが、派生クラスでこのメソッドをオーバーライドするときに使用できます。

適用対象

こちらもご覧ください