문자열이 출력되는 영역을 가져옵니다.
Namespace: Ntreev.Windows.Forms.GridAssembly: Ntreev.Windows.Forms.Grid (in Ntreev.Windows.Forms.Grid.dll) Version: 1.0.4216.32284
Syntax
C# |
---|
public Rectangle TextBound { get; } |
Visual Basic |
---|
Public ReadOnly Property TextBound As Rectangle Get |
Visual C++ |
---|
public: property Rectangle TextBound { Rectangle get (); } |
Return Value
문자열이 출력되는 영역을 나타내늗 Rectangle입니다.
Remarks
모든 문자열이 다 들어갈 수 있는 사각형의 영역을 나타냅니다. 이 값은 DisplayRectangle위치의 상대값입니다.
Examples
이 예제는 마우스 커서를 기준으로 셀을 검색한뒤 셀의 문자열 출력 영역을 검은색 테두리로 표시하는 코드입니다.
CopyC#

private void gridControl1_Paint(object sender, PaintEventArgs e) { Point location = this.gridControl1.PointToClient(Cursor.Position); Cell cell = this.gridControl1.GetCellAt(location); if (cell == null) return; Rectangle textBound = cell.TextBound; textBound.Offset(cell.DisplayRectangle.Location); e.Graphics.DrawRectangle(Pens.Black, textBound); }