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의 영역을 지정하는 DataGridView입니다.

cellsPaintSelectionBackground
Boolean

SelectionBackColorInheritedStyle 속성 색으로 지정된 범위의 배경을 그리려면 true이고, BackColorInheritedStyle 속성 색으로 지정된 범위의 배경을 그리려면 false입니다.

예외

RowIndex가 0보다 작거나 DataGridView 컨트롤의 행 수에서 1을 뺀 값보다 큰 경우

설명

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

적용 대상

추가 정보