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 FpSpread
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 viewport column
Remarks
Example
This example returns the viewport the user clicks in.
C# | Copy Code |
---|
private void fpSpread1MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
int i;
i = fpSpread1.GetRootWorkbook.GetColumnViewportIndexFromX(e.X);
Debug.WriteLine(i.ToString);
}
|
Visual Basic | Copy Code |
---|
Private Sub FpSpread1MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles FpSpread1.MouseDown
Dim i As Integer
i = FpSpread1.GetRootWorkbook.GetColumnViewportIndexFromX(e.X)
Debug.WriteLine(i.ToString)
End Sub |
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