SplitContainer

Inherits: Container < Control < CanvasItem < Node < Object

Inherited By: HSplitContainer, VSplitContainer

Container for splitting and adjusting.

Description

Container for splitting two Controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.

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:

  • DRAGGER_VISIBLE = 0 --- The split dragger is visible when the cursor hovers it.

  • DRAGGER_HIDDEN = 1 --- The split dragger is never visible.

  • DRAGGER_HIDDEN_COLLAPSED = 2 --- The split dragger is never visible and its space collapsed.

Property Descriptions

Default

false

Setter

set_collapsed(value)

Getter

is_collapsed()

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


Default

0

Setter

set_dragger_visibility(value)

Getter

get_dragger_visibility()

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


  • int split_offset

Default

0

Setter

set_split_offset(value)

Getter

get_split_offset()

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


Default

false

Setter

set_vertical(value)

Getter

is_vertical()

If true, the SplitContainer will arrange its children vertically, rather than horizontally.

Can't be changed when using HSplitContainer and VSplitContainer.

Method Descriptions

  • void clamp_split_offset ( )

Clamps the split_offset value to not go outside the currently possible minimal and maximum values.

Theme Property Descriptions

Default

1

Boolean value. If 1 (true), the grabber will hide automatically when it isn't under the cursor. If 0 (false), it's always visible.


  • int minimum_grab_thickness

Default

6

The minimum thickness of the area users can click on to grab the splitting line. If separation or h_grabber / v_grabber's thickness are too small, this ensure that the splitting line can still be dragged.


  • int separation

Default

12

The space between sides of the container.


The icon used for the grabber drawn in the middle area when vertical is false.


The icon used for the grabber drawn in the middle area when vertical is true.