語言

DataGridViewRowPostPaintEventArgs.PaintCellsBackground 方法

定義

繪製指定範圍內區域的格子背景。

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

參數

clipBounds
Rectangle

Rectangle A則指定要塗裝的區域DataGridView。

cellsPaintSelectionBackground
Boolean

true將指定界限的背景繪成 的性質顏色;SelectionBackColor將指定界限的背景繪成 的性質顏色InheritedStylefalse。BackColorInheritedStyle

例外狀況

RowIndex 小於零或大於控制列 DataGridView 數減一。

適用於

另請參閱