Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TextEdit.GetFirstCharIndexFromLine(Int32) Method

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

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: 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