# Sandbox.UI.Panel.OnLayout

```csharp
void OnLayout(ref Rect layoutRect)
```

This panel has just been laid out. You can modify its position now and it will affect its children.
This is a useful place to restrict shit to the screen etc.

### Parameters

- `ref layoutRect` (`Rect`)

Declared in [Sandbox.UI.Panel](/api/Sandbox.UI.Panel).
Assembly: `Sandbox.Engine`.
