# Sandbox.UI.Panel.AddEventListener

## Overload 1

```csharp
void AddEventListener(string eventName, System.Action<PanelEvent> e)
```

### Parameters

- `eventName` (`string`)
- `e` (`System.Action<PanelEvent>`)

## Overload 2

```csharp
void AddEventListener(string eventName, System.Action action)
```

Runs given callback when the given event is triggered, without access to the [Sandbox.UI.PanelEvent](/api/Sandbox.UI.PanelEvent).

### Parameters

- `eventName` (`string`)
- `action` (`System.Action`)

Declared in [Sandbox.UI.Panel](/api/Sandbox.UI.Panel).
Assembly: `Sandbox.Engine`.
