# Sandbox.UI.Label.CaretPosition

```csharp
int CaretPosition { get; set; }
```

Position of the text cursor/caret within the text, at which newly typed characters are inserted.
Setting it keeps it inside the text and scrolls to put it on screen - everything that moves
the caret goes through here, so nothing has to remember to do either.

Declared in [Sandbox.UI.Label](/api/Sandbox.UI.Label).
Assembly: `Sandbox.Engine`.
