# GetLineRect Method

> Returns the rectangle of a text line, without external leading, line spacing or indents, as an array of 4 Long values (left, top, right, bottom) in twips.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > GetLineRect Method
- **316 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/getlinerect-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/getlinerect-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/getlinerect-method/llms-full.txt

---

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](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-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](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/scrollposy-property/llms-full.txt) property.

### Syntax

```vbscript
TXTextControl.GetLineRect Line
```

### Parameters

| 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](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips).

### Data Types

| Name | Data type |
|---|---|
| Line | Long |
| Return value | Array of 4 Long |

### See Also

- [ScrollPosY Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/scrollposy-property/llms-full.txt)
- [GetBaseLinePos Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/getbaselinepos-method/llms-full.txt)
- [Programming Category: Line and Character Operations](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/line-character/llms-full.txt)

---

## Nearby

- **Previous:** [GetLineFromPoint Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/getlinefrompoint-method/llms-full.txt)
- **Next:** [GetTextExtent Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/gettextextent-method/llms-full.txt)
