Returns the rectangular area covered by a certain character. 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 ScrollPosX and the ScrollPosY properties.
Introduced: 22.0.
TXTextControl.GetCharRect Char
Parameter | Description | |
Char |
Specifies the index of the character which rectangle is returned. The index of the first character is zero. |
The method returns an array of 4 long values specifying the left, top, right and bottom border of the requested rectangle in twips.
Char: | Long |
Return value: | Array of 4 Long |
<< TXTextControl.GetCharFromLine Method | >> TXTextControl.GetLineCount Method