# InputPosFromPoint Method

> Returns the zero-based text input position at a point given in twips in the visible part of the TXTextControl text, or -1 if no text position could be found.

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

---

Returns the text input position belonging to a certain geometric position. The text input position is relative to the beginning of the text and the geometric position is a position in the visible part of the text.

### Syntax

```vbscript
TXTextControl.InputPosFromPoint X, Y
```

### Parameters

| Parameter | Description |
|---|---|
| X, Y | Specify the coordinates of the point. These values must be in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips). |

### Return Value

The method returns the text input position beginning with zero for the position in front of the first character. The method returns -1, if a text position could not be found.

### Data Types

| Name | Data type |
|---|---|
| X, Y | Long |
| Return value | Long |

### See Also

- [Programming Category: Text Selections and Character Input](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/selections/llms-full.txt)

---

## Nearby

- **Previous:** [IndentT Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/indentt-property/llms-full.txt)
- **Next:** [InsertionMode Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/insertionmode-property/llms-full.txt)
