# Sandbox.UI.Label.SetSelection

```csharp
void SetSelection(int start, int end)
```

Sets the text selection, preserving its anchor and direction.

### Parameters

- `start` (`int`)
- `end` (`int`)

Declared in [Sandbox.UI.Label](/api/Sandbox.UI.Label).
Assembly: `Sandbox.Engine`.
