DataGridViewRowPrePaintEventArgs.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 색으로 그리려면 ; InheritedStyle 의 속성 falseBackColor색으로 지정된 경계의 InheritedStyle 배경을 그립니다.

예외

RowIndex 가 0보다 작거나 컨트롤의 행 수에서 1 DataGridView 을 뺀 값보다 큽니다.

설명

PaintCellsBackground 셀 내용과 셀 내용을 직접 그릴 DataGridViewRow 때 이 메서드를 사용합니다. 전체 행과 해당 셀의 내용을 수동으로 그리는 경우 속성을 HandledEventArgs.Handled.로 설정합니다true. 이 HandledEventArgs.Handled경우 trueCellPainting 이벤트 및 RowPostPaint 이벤트가 발생하지 않습니다.

적용 대상

추가 정보