# Editor.Widget.SetContext

```csharp
void SetContext(string key, object value)
```

Set a context value on this widget. This context will be available to its children via FindContext.

### Parameters

- `key` (`string`)
- `value` (`object`)

Declared in [Editor.Widget](/api/Editor.Widget).
Assembly: `Sandbox.Tools`.
