GetCharRect Method
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.
Syntax
TXTextControl.GetCharRect Char
Parameters
| Parameter | Description |
|---|---|
| Char | Specifies the index of the character which rectangle is returned. The index of the first character 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
| Name | Data type |
|---|---|
| Char | Long |
| Return value | Array of 4 Long |