FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : GetCellRectangle Method |
'Declaration Public Function GetCellRectangle( _ ByVal rowViewportIndex As Integer, _ ByVal columnViewportIndex As Integer, _ ByVal row As Integer, _ ByVal column As Integer _ ) As Rectangle
'Usage 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 )
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.
Rectangle r; r = fpSpread1.GetCellRectangle(0, 0, 2, 2); MessageBox.Show(r.Left.ToString());
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 Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10