Version

CalculateLineIndent Method

Returns the number of columns to indent a line.
Syntax
'Declaration
 
Function CalculateLineIndent( _
   ByVal document As TextDocument, _
   ByVal lineIndex As Integer _
) As Integer
int CalculateLineIndent( 
   TextDocument document,
   int lineIndex
)

Parameters

document
The document being edited.
lineIndex
The zero-based line index of the line being indented

Return Value

The number of columns to indent the line (i.e. the amount of whitespace before the first non-tab or space character).
Remarks

Note: use the LineFromIndex and/or GetLines methods off the document's CurrentSnapshot to analyze the line. Also, the document's TabExtent provides the number of characters that determine tab locations within a line.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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