# Sandbox.UI.Panel.OnButtonEvent

```csharp
void OnButtonEvent(ButtonEvent e)
```

Called when any button, mouse (except for mouse4/5) and keyboard, are pressed or depressed while hovering this panel.

### Parameters

- `e` (`ButtonEvent`)

Declared in [Sandbox.UI.Panel](/api/Sandbox.UI.Panel).
Assembly: `Sandbox.Engine`.
