Spread Windows Forms 7.0 Product Documentation
GetViewportRectangle Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : GetViewportRectangle Method


rowViewportIndex
Viewport row index
columnViewportIndex
Viewport column index

Glossary Item Box

Gets the rectangle of the viewport.

Syntax

Visual Basic (Declaration) 
Public Function GetViewportRectangle( _
   ByVal rowViewportIndex As Integer, _
   ByVal columnViewportIndex As Integer _
) As Rectangle
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim rowViewportIndex As Integer
Dim columnViewportIndex As Integer
Dim value As Rectangle
 
value = instance.GetViewportRectangle(rowViewportIndex, columnViewportIndex)
C# 
public Rectangle GetViewportRectangle( 
   int rowViewportIndex,
   int columnViewportIndex
)

Parameters

rowViewportIndex
Viewport row index
columnViewportIndex
Viewport column index

Return Value

Rectangleobject containing the x-, and y-coordinates, and the height, and width of the viewport rectangle

Remarks

This method allows you to retrieve bounding coordinates for a specific viewport on the active sheet. This exposes at the component level the four methods in the SpreadView class:

The viewport column and viewport row indexes are zero-based, so the first (leftmost) viewport column and first (top) viewport row both have indexes of 0.

Example

This example returns the top of the viewport rectangle.
C#Copy Code
Rectangle r;
r = fpSpread1.GetViewportRectangle(0, 0);
Debug.WriteLine(r.Top.ToString());
Visual BasicCopy Code
Dim r As Rectangle
r = FpSpread1.GetViewportRectangle(0, 0)
Debug.WriteLine(r.Top.ToString)

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.