Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

SplitContainer

Inherits: Container < Control < CanvasItem < Node < Object

Inherited By: HSplitContainer, VSplitContainer

A container that splits two child controls horizontally or vertically and provides a grabber for adjusting the split ratio.

Description

A container that accepts only two child controls, then arranges them horizontally or vertically and creates a divisor between them. The divisor can be dragged around to change the size relation between the child controls.

Tutorials

Properties

bool

collapsed

false

DraggerVisibility

dragger_visibility

0

int

split_offset

0

bool

vertical

false

Methods

void

clamp_split_offset ( )

Theme Properties

int

autohide

1

int

minimum_grab_thickness

6

int

separation

12

Texture2D

h_grabber

Texture2D

v_grabber


Signals

dragged ( int offset )

Emitted when the dragger is dragged by user.


Enumerations

enum DraggerVisibility:

DraggerVisibility DRAGGER_VISIBLE = 0

The split dragger is visible when the cursor hovers it.

DraggerVisibility DRAGGER_HIDDEN = 1

The split dragger is never visible.

DraggerVisibility DRAGGER_HIDDEN_COLLAPSED = 2

The split dragger is never visible and its space collapsed.


Property Descriptions

bool collapsed = false

  • void set_collapsed ( bool value )

  • bool is_collapsed ( )

If true, the area of the first Control will be collapsed and the dragger will be disabled.


DraggerVisibility dragger_visibility = 0

Determines the dragger's visibility. See DraggerVisibility for details.


int split_offset = 0

  • void set_split_offset ( int value )

  • int get_split_offset ( )

The initial offset of the splitting between the two Controls, with 0 being at the end of the first Control.