# ToggleVisibility(int)

> Method for toggling the visibility of a column.

## Definition

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

```csharp
protected virtual void ToggleVisibility(int columnIndex)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Toggle visibility for this column.

### Remarks

This is also called from the context menu of the MultiColumnHeader. This method toggles the visiblity state, calls ::ef::OnVisibleColumnsChanged which in turn dispatces the [MultiColumnHeader.visibleColumnsChanged](/engine/6000.3/script-reference/unityeditor/imgui/controls/multicolumnheader/visiblecolumnschanged.md) event.
