TXTextControl.GetLineRect Method

Returns the rectangular area covered by a line of text. The rectangle does not include the external leading area, additional linespacing or paragraph indents. The dimensions are given in twips with an origin at the upper left corner of the Text Control's complete text. The relationship between the upper left corner of the complete text and the upper left corner of the control can be obtained with the ScrollPosY property.

Syntax

TXTextControl.GetLineRect Line
Parameter Description
Line

Specifies the index of the line which rectangle is returned. The index of the first line is zero.

Return Value

The method returns an array of 4 long values specifying the left, top, right and bottom border of the requested rectangle in twips.

Data Types

Line:    Long
Return value:    Array of 4 Long

See Also