# GetCellRect(int)

> If using a MultiColumnHeader for the TreeView this method can be used to get the cell rects of a row using the visible columns of the MultiColumnHeader.

## Definition

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

```csharp
public Rect GetCellRect(int visibleColumnIndex)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index into the list of visible columns of the multi column header.

### Returns

| Type                                                        | Description                                                                                    |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [Rect](/engine/6000.5/script-reference/unityengine/rect.md) | Cell rect defined by the intersection between the row rect and the rect of the visible column. |

### Remarks

Note the returned cell rect is affected by the [TreeView\<TIdentifier>.cellMargin](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/cellmargin.md) value.

Additional Resources: [MultiColumnHeader](/engine/6000.5/script-reference/unityeditor/imgui/controls/multicolumnheader.md), [TreeView\<TIdentifier>.RowGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowgui.md), [TreeView\<TIdentifier>.RowGUIArgs.GetNumVisibleColumns](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowguiargs/getnumvisiblecolumns.md), [TreeView\<TIdentifier>.RowGUIArgs.GetColumn](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowguiargs/getcolumn.md).
