# Sandbox.UI.InputFocus.Set

```csharp
static bool Set(Panel panel)
```

Set the focus to this panel (or its nearest ancestor with AcceptsFocus).
Note that [Sandbox.UI.InputFocus.Current](/api/Sandbox.UI.InputFocus/Current) won't change until the next frame.

### Parameters

- `panel` (`Panel`)

### Returns

`bool`

Declared in [Sandbox.UI.InputFocus](/api/Sandbox.UI.InputFocus).
Assembly: `Sandbox.Engine`.
