VerticalToolbar

DrawGUI scope that combines Odin Inspector's SirenixEditorGUI.BeginHorizontalToolbar with EditorGUILayout.BeginVertical to create a toolbar area where content flows vertically. Useful for multi-row toolbar layouts.

Definition

Namespace: Paragon.Editor Assembly: Paragon.Editor.dll

public static partial class DrawGUI
{
    public static Scope VerticalToolbar(float height = 23f, int paddingTop = 0)
    public static Scope VerticalToolbar(this Scope scope, float height = 23f, int paddingTop = 0)

    private class VerticalToolbarScope : Scope
}

Dependency: Sirenix.Utilities.Editor (Odin Inspector)

Remarks

Unlike HorizontalToolbar, this scope nests a vertical layout inside a horizontal toolbar. This means the toolbar provides the styled background and dimensions, while content is stacked vertically within it.

Begin/End Sequence

OnBegin:  SirenixEditorGUI.BeginHorizontalToolbar → EditorGUILayout.BeginVertical
OnEnd:    EditorGUILayout.EndVertical → SirenixEditorGUI.EndHorizontalToolbar

The end calls are in reverse order (LIFO), matching the nesting.

Quick Lookup

Goal
How

Default vertical toolbar

using (DrawGUI.VerticalToolbar()) { ... }

Custom height

using (DrawGUI.VerticalToolbar(height: 60f)) { ... }

With top padding

using (DrawGUI.VerticalToolbar(paddingTop: 2)) { ... }

Chain onto scope

using (DrawGUI.VerticalLayout().VerticalToolbar()) { ... }

Factory Methods

Standalone

Extension (Chaining)

Parameter
Type
Default
Description

height

float

23f

Toolbar height in pixels

paddingTop

int

0

Top padding in pixels

VerticalToolbarScope (private)

Member
Description

height

float — toolbar height

paddingTop

int — top padding

OnBegin()

Calls SirenixEditorGUI.BeginHorizontalToolbar(height, paddingTop) then EditorGUILayout.BeginVertical()

OnEnd()

Calls EditorGUILayout.EndVertical() then SirenixEditorGUI.EndHorizontalToolbar()

Common Pitfalls

circle-exclamation

Examples

Multi-Row Toolbar

Toolbar with Stacked Labels

See Also

Last updated