言語

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

true指定した境界の背景をSelectionBackColorInheritedStyleプロパティの色で塗りつぶす場合はfalse。指定した境界の背景をBackColorInheritedStyleプロパティの色で塗りつぶします。

例外

RowIndex が -1 より小さいか、 DataGridView コントロールの行数以上です。

-又は-

ColumnIndex が -1 より小さいか、 DataGridView コントロール内の列の数以上です。

適用対象

こちらもご覧ください