Version

GetLineNumber Method (FormattedTextEditInfo)

Returns the 1-based index of the line to which the specified caret position belongs. This will work only if the caret position is associated with an inline object. If not then this method will return -1.
Syntax
'Declaration
 
Public Function GetLineNumber( _
   ByVal caretPos As Integer _
) As Integer
public int GetLineNumber( 
   int caretPos
)

Parameters

caretPos
The character position whose line is to be returned, or -1 to specify the current location of the caret.
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