Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / FpSpread Class / GetCellRectangle Method
Index of the row of the viewport
Index of the column of the viewport
Row index of the cell
Column index of the cell

In This Topic
    GetCellRectangle Method (FpSpread)
    In This Topic
    Gets the rectangle of the cell.
    Public Function GetCellRectangle( _
       ByVal rowViewportIndex As Integer, _
       ByVal columnViewportIndex As Integer, _
       ByVal row As Integer, _
       ByVal column As Integer _
    ) As Rectangle
    Dim instance As FpSpread
    Dim rowViewportIndex As Integer
    Dim columnViewportIndex As Integer
    Dim row As Integer
    Dim column As Integer
    Dim value As Rectangle
    value = instance.GetCellRectangle(rowViewportIndex, columnViewportIndex, row, column)
    public Rectangle GetCellRectangle( 
       int rowViewportIndex,
       int columnViewportIndex,
       int row,
       int column


    Index of the row of the viewport
    Index of the column of the viewport
    Row index of the cell
    Column index of the cell

    Return Value

    Rectangle object containing the size and location of the rectangle of the cell

    Use this method to identify the position of a cell relative to its location as it is viewed in the Spread component. For example, suppose you have a Spread that displays 10 rows at a time. Additionally, you are bound to a data source with 500 rows and during the course of operation the user has scrolled to a position that displays the 235th row. You can use this method to determine the exact pixel location of the 235th row relative to the top of the view window that is displaying the 10 rows out of the total 500 in the data source.

    This example returns the rectangle of the cell.
    Rectangle r;
    r = fpSpread1.GetCellRectangle(0, 0, 2, 2);
    Dim r As Rectangle
    r = FpSpread1.GetCellRectangle(0, 0, 2, 2)
    See Also