DataGridViewRow.PaintHeader 메서드

정의

현재 행의 머리글 셀을 그립니다.

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

매개 변수

graphics
Graphics

DataGridViewRow을 그리는 데 사용되는 Graphics입니다.

clipBounds
Rectangle

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

rowBounds
Rectangle

그리고 있는 DataGridViewRow의 범위를 포함하는 Rectangle입니다.

rowIndex
Int32

그리고 있는 셀의 행 인덱스입니다.

rowState
DataGridViewElementStates

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

isFirstDisplayedRow
Boolean

현재 행이 DataGridView에 표시되는 첫 번째 행임을 나타내려면 true이고, 그렇지 않으면 false입니다.

isLastVisibleRow
Boolean

현재 행이 DataGridView 속성이 true로 설정된 Visible의 마지막 행임을 나타내려면 true이고, 그렇지 않으면 false입니다.

paintParts
DataGridViewPaintParts

그릴 셀의 부분을 나타내는 DataGridViewPaintParts 값의 비트 조합입니다.

예외

행이 DataGridView 컨트롤에 추가되지 않은 경우

paintPartsDataGridViewPaintParts 값의 유효한 비트 조합이 아닌 경우

설명

컨트롤은 DataGridView 이 메서드를 호출하여 이벤트에 대한 처리기가 속성을 true로 설정하는 경우를 DataGridView.RowPrePaint 제외하고 행 헤더를 HandledEventArgs.Handled 그립니다. 자세한 내용은 Paint를 참조하세요.

적용 대상

추가 정보