Vcl.ComCtrls.TCustomRichEdit.ActiveLineNo

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ActiveLineNo: DWORD read GetActiveLineNo;

C++

__property unsigned ActiveLineNo = {read=GetActiveLineNo, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TCustomRichEdit

Description

Specifies the number of the currently active line in the control.

ActiveLineNo is a read-only property that specifies the line number of the line at which the caret is currently located. The numbering of lines specified by the ActiveLineNo property starts with 0.

The Y field of the CaretPos property can also be used to retrieve the line number where the caret is positioned at. However, this only works when the WordWrap property is set to False.

As opposed to the value of Y of the CaretPos property, ActiveLineNo always gives the correct line number, no matter the value of WordWrap.

Note: If a block of text is selected, ActiveLineNo specifies the line number of the line containing the beginning of the selection.

See Also