다음을 통해 공유


DataGridViewRow.Paint 메서드

정의

현재 행을 그립니다.

protected public:
 virtual void Paint(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle rowBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow);
protected internal virtual void Paint(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle rowBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow);
abstract member Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool -> unit
override this.Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool -> unit
Protected Friend Overridable Sub Paint (graphics As Graphics, clipBounds As Rectangle, rowBounds As Rectangle, rowIndex As Integer, rowState As DataGridViewElementStates, isFirstDisplayedRow As Boolean, isLastVisibleRow As Boolean)

매개 변수

graphics
Graphics

를 그리DataGridViewRowGraphics 데 사용됩니다.

clipBounds
Rectangle

그려야 하는 영역을 DataGridView 나타내는 A Rectangle 입니다.

rowBounds
Rectangle

Rectangle 그리는 범위 DataGridViewRow 가 들어 있는 A입니다.

rowIndex
Int32

그릴 셀의 행 인덱스입니다.

rowState
DataGridViewElementStates

행의 상태를 지정하는 값의 DataGridViewElementStates 비트 조합입니다.

isFirstDisplayedRow
Boolean

현재 행이 첫 번째 행에 표시되는 지 여부를 나타내려면 이고, 그렇지 않으면 입니다.

isLastVisibleRow
Boolean

현재 행이 속성이 설정된 마지막 행 인지 여부를 나타내려면 이고, 그렇지 않으면 .

예외

행이 컨트롤에 DataGridView 추가되지 않았습니다.

-또는-

행은 컨트롤에 DataGridView 있으며 공유 행입니다.

행은 컨트롤에 DataGridView 있으며 rowIndex 0보다 작거나 컨트롤의 행 수에서 1을 뺀 값보다 큽니다.

설명

컨트롤은 DataGridView 행을 그리기 위해 이 메서드를 호출합니다.

이 메서드를 호출하면 DataGridView.RowPrePaint 이벤트가 발생합니다. 이벤트에 대한 처리기가 속성을 설정 HandledEventArgs.Handled 하지 않으면 이 메서드도 호출 및 PaintCells 메서드를 PaintHeader 호출하고 이벤트를 발생합니다 DataGridView.RowPostPainttrue.

적용 대상

추가 정보