DataGridViewCell.ContentBounds 속성

정의

셀의 내용 영역을 둘러싸는 경계 사각형을 가져옵니다.

public:
 property System::Drawing::Rectangle ContentBounds { System::Drawing::Rectangle get(); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Rectangle ContentBounds { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ContentBounds : System.Drawing.Rectangle
Public ReadOnly Property ContentBounds As Rectangle

속성 값

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

특성

예외

셀을 포함하는 행이 공유 행인 경우

또는

셀이 열 머리글 셀인 경우

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

설명

반환된 사각형은 클라이언트 좌표를 픽셀 단위로 보고합니다.

이 속성은 메서드를 GetContentBounds 호출하여 해당 값을 가져옵니다. 기본 DataGridViewCell 형식의 경우 이 값은 입니다 Empty.

셀 내용이 아닌 셀의 경계 사각형을 얻으려면 메서드를 DataGridView.GetCellDisplayRectangle 사용합니다.

적용 대상

추가 정보