Skip to main content
A newer version of this page is available. .
All docs
V21.2

TextEdit.GetFirstCharIndexFromLine(Int32) Method

Retrieves the index of the first character of a given line.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

Declaration

public virtual int GetFirstCharIndexFromLine(
    int lineNumber
)

Parameters

Name Type Description
lineNumber Int32

The zero-based index of the target displayed line.

Returns

Type Description
Int32

The zero-based index of the first character in the specified line.

Remarks

If the lineNumber parameter does not refer to an existing line, the GetFirstCharIndexFromLine method returns -1.

The GetFirstCharIndexFromLine method returns the first character index of a specified displayed line. The number of displayed lines can be greater than the number of logical lines due to word wrap.

See Also