Visual Basic (Declaration) | |
---|---|
Public Function GetCellRectangle( _ ByVal rowViewportIndex As Integer, _ ByVal columnViewportIndex As Integer, _ ByVal row As Integer, _ ByVal column As Integer _ ) As Rectangle |
Visual Basic (Usage) | Copy Code |
---|---|
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) |
C# | |
---|---|
public Rectangle GetCellRectangle( int rowViewportIndex, int columnViewportIndex, int row, int column ) |
Parameters
- rowViewportIndex
- Index of the row of the viewport
- columnViewportIndex
- Index of the column of the viewport
- row
- Row index of the cell
- column
- Column index of the cell
Return Value
Rectangle object containing the size and location of the rectangle of the cellUse 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.
C# | Copy Code |
---|---|
Rectangle r r = fpSpread1.GetCellRectangle(0, 0, 2, 2); MessageBox.Show(r.Left.ToString()); |
Visual Basic | Copy Code |
---|---|
Dim r As Rectangle r = FpSpread1.GetCellRectangle(0, 0, 2, 2) MessageBox.Show(r.Left.ToString()) |
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8
Reference
FpSpread ClassFpSpread Members