DataGridViewCellPaintingEventArgs.PaintBackground(Rectangle, Boolean) メソッド

定義

指定した境界内の領域のセルの背景を描画します。

public:
 void PaintBackground(System::Drawing::Rectangle clipBounds, bool cellsPaintSelectionBackground);
public void PaintBackground (System.Drawing.Rectangle clipBounds, bool cellsPaintSelectionBackground);
member this.PaintBackground : System.Drawing.Rectangle * bool -> unit
Public Sub PaintBackground (clipBounds As Rectangle, cellsPaintSelectionBackground As Boolean)

パラメーター

clipBounds
Rectangle

描画が必要な Rectangle の領域を表す DataGridView

cellsPaintSelectionBackground
Boolean

SelectionBackColorInheritedStyle プロパティの色で、指定した境界の背景を描画する場合は trueBackColorInheritedStyle プロパティの色で、指定した境界の背景を描画する場合は false

例外

RowIndex が -1 未満か、DataGridView コントロールに含まれている行数以上です。

  • または - ColumnIndex が -1 未満か、DataGridView コントロールに含まれている列数以上です。

適用対象

こちらもご覧ください