# InputPosition Class

> An instance of the InputPosition class represents the current text input position of a TXTextControl document.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > InputPosition Class
- **1524 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/llms-full.txt

---

### Description

An instance of the InputPosition class represents the current text input position of a TXTextControl document.

### Syntax

```csharp
public class InputPosition
```

```vbnet
Public Class InputPosition
```

### Examples

The following example shows how to add a TextField to the document and how to set the input position right after the field.

```csharp
textControl1.Selection.Text = "Name: ";
TXTextControl.TextField field = new TXTextControl.TextField("%name%");
field.DoubledInputPosition = true;
field.ShowActivated = true;

textControl1.TextFields.Add(field);
textControl1.InputPosition = new TXTextControl.InputPosition(
                             field.Start + field.Length - 1,
                             TXTextControl.TextFieldPosition.OutsideTextField);
```

```vbnet
TextControl1.Selection.Text = "Name: "
Dim field As TXTextControl.TextField = New TXTextControl.TextField("%name%")
field.DoubledInputPosition = True
field.ShowActivated = True

TextControl1.TextFields.Add(field)
TextControl1.InputPosition = New TXTextControl.InputPosition( _
                             field.Start + field.Length - 1, _
                             TXTextControl.TextFieldPosition.OutsideTextField)
```

The following example examines or changes the insertion point in a short document.

```csharp
textControl.Text = "Project summary";
InputPosition inputPosition = textControl.InputPosition;
```

```vbnet
textControl.Text = "Project summary"
Dim inputPosition As InputPosition = textControl.InputPosition
```

---

## In This Section

- [InputPosition.CaretSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/caretsize-property/llms-full.txt): Gets the size of the caret, in pixels, at the current text input position.
- [InputPosition.Column Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/column-property/llms-full.txt): Gets the column number of the current text input position. The first column in front of the text is zero.
- [InputPosition Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/constructor/llms-full.txt): Creates a new instance of the InputPosition class.
- [InputPosition.InactiveMarker Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/inactivemarker-property/llms-full.txt): Shows or hides a marker which indicates the current text input position when the TextControl is inactive and the blinking caret is not visible. If the property value is true, the marker is shown.
- [InputPosition.Line Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/line-property/llms-full.txt): Gets the line number of the current text input position. The first line on top of the page is 1.
- [InputPosition.Location Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/location-property/llms-full.txt): Gets the geometric location of the current text input position. The location is given in twips with an origin at the upper left corner of the document. The relationship between the upper left corner of the document and the upper left corner of the visible portion of the document can be obtained with the TextControl.ScrollLocation property.
- [InputPosition.Page Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/page-property/llms-full.txt): Gets the page number of the current text input position. This property returns the page number only if the TextControl.ViewMode property has been set to ViewMode.PageView.
- [InputPosition.PageInSection Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/pageinsection-property/llms-full.txt): Gets the page number in the section containing the current text input position. This property returns the page number only if the TextControl.ViewMode property has been set to ViewMode.PageView.
- [InputPosition.ScrollPosition Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/scrollposition-enumeration/llms-full.txt): Determines a position to where the input position is scrolled.
- [InputPosition.ScrollTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/scrollto-method/llms-full.txt): Scrolls the contents of a Text Control so that the current input position becomes visible.
- [InputPosition.Section Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/section-property/llms-full.txt): Gets the section number of the current text input position. The first section in the document has the number 1.
- [InputPosition.TextPosition Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/textposition-property/llms-full.txt): Gets the text position of the current text input position. The first text position of a document is zero.

---

## Nearby

- **Previous:** [InputFormat.VerticallyCentered Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputformat/verticallycentered-property/llms-full.txt)
- **Next:** [InputPosition.CaretSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputposition/caretsize-property/llms-full.txt)
