# ResizeToFit()

> Resizes the column widths of the columns that have auto-resize enabled to make all the columns fit to the width of the MultiColumnHeader render rect.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.IMGUI.Controls](/engine/6000.3/script-reference/unityeditor/imgui/controls.md)
* **Assembly:** UnityEditor

```csharp
public void ResizeToFit()
```

### Remarks

If no columns have [MultiColumnHeaderState.Column.autoResize](/engine/6000.3/script-reference/unityeditor/imgui/controls/multicolumnheaderstate/column/autoresize.md) enabled then this method does nothing. This method is also called when selecting the 'Resize To Fit' context menu of the MultiColumnHeader.
