Spread Windows Forms 6.0 Product Documentation
GetColumnViewportIndexFromX Method
See Also  Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SpreadView Class : GetColumnViewportIndexFromX Method


x
X coordinate

Glossary Item Box

Gets the index of the viewport column for the specified coordinate for the active sheet.

Syntax

Visual Basic (Declaration) 
Public Function GetColumnViewportIndexFromX( _
   ByVal x As Integer _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As SpreadView
Dim x As Integer
Dim value As Integer
 
value = instance.GetColumnViewportIndexFromX(x)
C# 
public int GetColumnViewportIndexFromX( 
   int x
)

Parameters

x
X coordinate

Return Value

Integer index of the viewport column

Remarks

This method (along with GetRowViewportIndexFromY) allows you to retrieve the index of the viewport row or viewport column from pixel offsets. This is useful in mouse-handling to see in which viewport a mouse event (MouseDown, MouseMove, etc.) occurred.

The viewport column index is zero-based, so the first (leftmost) viewport column has an index of 0.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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