# Sandbox.UI.Panel.FocusOnClick

```csharp
bool FocusOnClick { get; set; }
```

True by default. Whether clicking this panel gives it focus. Controls that only want focus for
keyboard navigation, like buttons, turn this off - clicking one focuses its nearest ancestor
that takes focus from a click instead, or clears focus if there isn't one.

Declared in [Sandbox.UI.Panel](/api/Sandbox.UI.Panel).
Assembly: `Sandbox.Engine`.
