DataGridView.GetRowDisplayRectangle(Int32, Boolean) 方法

定义

返回表示某一行(由行索引确定)的显示区域的矩形。Returns the rectangle that represents the display area for a row, as determined by the row index.

public:
 System::Drawing::Rectangle GetRowDisplayRectangle(int rowIndex, bool cutOverflow);
public System.Drawing.Rectangle GetRowDisplayRectangle (int rowIndex, bool cutOverflow);
member this.GetRowDisplayRectangle : int * bool -> System.Drawing.Rectangle
Public Function GetRowDisplayRectangle (rowIndex As Integer, cutOverflow As Boolean) As Rectangle

参数

rowIndex
Int32

所需单元格的行索引。The row index for the desired cell.

cutOverflow
Boolean

如果要返回 DataGridView 界限内可见的行矩形,为 true;如果要返回整个行矩形,为 falsetrue to return the row rectangle visible in the DataGridView bounds; false to return the entire row rectangle.

返回

表示行显示矩形的 RectangleThe Rectangle that represents the display rectangle of the row.

异常

rowIndex 不在 0 到行数减 1 的有效范围内。rowIndex is not in the valid range of 0 to the number of rows minus 1.

适用于

另请参阅