DataGridViewRowPrePaintEventArgs.PaintCellsBackground Metoda

Definice

Nakreslí pozadí buňky pro oblast v zadaných mezích.

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)

Parametry

clipBounds
Rectangle

A Rectangle , která určuje oblast DataGridView , která se má malovat.

cellsPaintSelectionBackground
Boolean

true nakreslit pozadí zadaných hranic barvou SelectionBackColor vlastnosti InheritedStyle; false nakreslit pozadí zadaných hranic barvou BackColor vlastnosti InheritedStyle.

Výjimky

RowIndex je menší než nula nebo větší než počet řádků v ovládacím DataGridView prvku minus jeden.

Poznámky

Tuto metodu PaintCellsBackground použijte, když sami nakreslíte DataGridViewRow obsah buněk a jeho buněk. Pokud ručně namalujete celý řádek a jeho obsah buněk, nastavte HandledEventArgs.Handled vlastnost na truehodnotu . Pokud HandledEventArgs.Handled je true, a CellPaintingRowPostPaint události nedochází.

Platí pro

Viz také