Source.VisiblePositionToColumn Method

Gets the character offset on the given line corresponding to the specified screen column position.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Declaration
Public Function VisiblePositionToColumn ( _
    line As Integer, _
    visiblePosition As Integer _
) As Integer
public int VisiblePositionToColumn(
    int line,
    int visiblePosition
)
public:
int VisiblePositionToColumn(
    int line, 
    int visiblePosition
)
member VisiblePositionToColumn : 
        line:int * 
        visiblePosition:int -> int
public function VisiblePositionToColumn(
    line : int, 
    visiblePosition : int
) : int

Parameters

  • line
    Type: Int32

    The number of the line to examine.

  • visiblePosition
    Type: Int32

    The screen column to convert.

Return Value

Type: Int32
The character offset into the line. If the visible position is off the end of the line, then return the length of the line.

Remarks

This method takes into account tab size and tab stops. This method is the opposite of the ColumnToVisiblePosition method.

.NET Framework Security

See Also

Reference

Source Class

Microsoft.VisualStudio.Package Namespace