# Sandbox.UI.TextEntry.AddToHistory

```csharp
void AddToHistory(string str)
```

Add given string to the history of this text entry. 
The history can be accessed by the player by pressing up and down arrows with an empty text entry.

### Parameters

- `str` (`string`)

Declared in [Sandbox.UI.TextEntry](/api/Sandbox.UI.TextEntry).
Assembly: `Sandbox.Engine`.
