# ToggleLeft

> Makes a toggle field where the toggle is to the left and the label immediately to the right of it.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## ToggleLeft(Rect, string, bool, GUIStyle)

Makes a toggle field where the toggle is to the left and the label immediately to the right of it.

```csharp
public static bool ToggleLeft(Rect position, string label, bool value, GUIStyle labelStyle)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): Rectangle on the screen to use for the toggle.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label to display next to the toggle.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): The value to edit.**** (\[GUIStyle]\(/engine/6000.0/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.0/script-reference/unityengine/guistyle.md) to use for the label.

### Returns

| Type                                                          | Description                |
| ------------------------------------------------------------- | -------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | The value set by the user. |

### Remarks

[EditorGUI.ToggleLeft](/engine/6000.0/script-reference/unityeditor/editorgui/toggleleft.md) is similar to [GUI.Toggle](/engine/6000.0/script-reference/unityengine/gui/toggle.md) but respects the [EditorGUI.showMixedValue](/engine/6000.0/script-reference/unityeditor/editorgui/showmixedvalue.md) property and handles keyboard focus consistent with other Editor controls.

## ToggleLeft(Rect, GUIContent, bool, GUIStyle)

Makes a toggle field where the toggle is to the left and the label immediately to the right of it.

```csharp
public static bool ToggleLeft(Rect position, GUIContent label, bool value, GUIStyle labelStyle)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): Rectangle on the screen to use for the toggle.**** (\[GUIContent]\(/engine/6000.0/script-reference/unityengine/guicontent)): Label to display next to the toggle.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): The value to edit.**** (\[GUIStyle]\(/engine/6000.0/script-reference/unityengine/guistyle)): Optional [GUIStyle](/engine/6000.0/script-reference/unityengine/guistyle.md) to use for the label.

### Returns

| Type                                                          | Description                |
| ------------------------------------------------------------- | -------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | The value set by the user. |

### Remarks

[EditorGUI.ToggleLeft](/engine/6000.0/script-reference/unityeditor/editorgui/toggleleft.md) is similar to [GUI.Toggle](/engine/6000.0/script-reference/unityengine/gui/toggle.md) but respects the [EditorGUI.showMixedValue](/engine/6000.0/script-reference/unityeditor/editorgui/showmixedvalue.md) property and handles keyboard focus consistent with other Editor controls.
