DataGridViewCell.GetContentBounds 메서드

정의

셀의 내용 영역을 둘러싸는 경계 사각형을 반환합니다.

오버로드

GetContentBounds(Int32)

현재 셀에 적용되는 셀 스타일과 기본 Graphics를 사용하여 셀의 내용 영역을 둘러싸는 경계 사각형을 반환합니다.

GetContentBounds(Graphics, DataGridViewCellStyle, Int32)

지정된 Graphics 와 셀 스타일을 사용하여 계산된 셀의 콘텐츠 영역을 둘러싸는 경계 사각형을 반환합니다.

GetContentBounds(Int32)

현재 셀에 적용되는 셀 스타일과 기본 Graphics를 사용하여 셀의 내용 영역을 둘러싸는 경계 사각형을 반환합니다.

public:
 System::Drawing::Rectangle GetContentBounds(int rowIndex);
public System.Drawing.Rectangle GetContentBounds (int rowIndex);
member this.GetContentBounds : int -> System.Drawing.Rectangle
Public Function GetContentBounds (rowIndex As Integer) As Rectangle

매개 변수

rowIndex
Int32

셀의 부모 행의 인덱스입니다.

반환

셀 내용의 경계를 지정하는 Rectangle입니다.

예외

지정된 rowIndex가 0보다 작거나 컨트롤의 행 수에서 1을 뺀 값보다 큰 경우

ColumnIndex가 0보다 작아 셀이 행 머리글 셀임을 나타내는 경우

설명

이 메서드가 호출 될 때 셀의 내용의 크기를 동적으로 계산 됩니다. 기본 클래스 구현은 항상 를 반환합니다 Rectangle.Empty.

추가 정보

적용 대상

GetContentBounds(Graphics, DataGridViewCellStyle, Int32)

지정된 Graphics 와 셀 스타일을 사용하여 계산된 셀의 콘텐츠 영역을 둘러싸는 경계 사각형을 반환합니다.

protected:
 virtual System::Drawing::Rectangle GetContentBounds(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex);
protected virtual System.Drawing.Rectangle GetContentBounds (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex);
abstract member GetContentBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle
override this.GetContentBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle
Protected Overridable Function GetContentBounds (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer) As Rectangle

매개 변수

graphics
Graphics

셀에 대한 그래픽 컨텍스트입니다.

cellStyle
DataGridViewCellStyle

셀에 적용할 DataGridViewCellStyle입니다.

rowIndex
Int32

셀의 부모 행의 인덱스입니다.

반환

셀 내용의 경계를 지정하는 Rectangle입니다.

설명

이 메서드가 호출 될 때 셀의 내용의 크기를 동적으로 계산 됩니다. 기본 클래스 구현은 항상 를 반환합니다 Rectangle.Empty.

이 메서드는 경우 호출 하는 내부적으로 ContentBounds 속성이 읽기.

추가 정보

적용 대상