Version

GetLineNumber Method (TextUIElementBase)

Returns the index of the line that contains the specified character index in a multiline edit control. A character index is the zero-based index of the character from the beginning of the edit control.
Syntax
'Declaration
 
Public Function GetLineNumber( _
   ByVal caretPosition As Integer _
) As Integer
public int GetLineNumber( 
   int caretPosition
)

Parameters

caretPosition
The character index of the characters whose line number is to be returned.
Remarks

This is the line number of the character at the caret position. This method accounts for line breaks and word wrapping if these are enabled on the element.

The character index of the characters whose line number is to be returned.
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