reckfellENGINE

SplitContainer

Panes with user-adjustable boundaries.

On this page
class SplitContainerReckfellSharpInherits Container

Places eligible direct child Controls sequentially with dividers between them. Supports more than two panes. Base SplitContainer is horizontal and permits changing Vertical; HSplitContainer and VSplitContainer fix the axis. Hidden Controls, TopLevel and ordinary intermediate Entities are not ordinary layout panes.

SplitOffsets stores pixel offsets from the baseline distribution computed from container size, child SizeFlags, stretch ratios and constraints. These are neither absolute coordinates nor percentages. For three evenly expanding panes in a 300-wide area without gaps, zero offsets produce widths 100/100/100; [20, -10] produces 120/70/110. This assumes LTR and DraggerVisibility = HiddenCollapsed.

The int[] is copied on assignment and retrieval: edit a copy and assign it back. Save the entire SplitOffsets array for multiple panes. Deprecated SplitOffset, GetSplitOffset and SetSplitOffset address only the first boundary. After adding panes or resizing, wait for layout before reading resulting geometry.

Layout constrains visual positions to allowed sizes, but stored offsets can remain out of range. After layout has completed, call ClampSplitOffset(priorityIndex) to normalize offsets; the zero-based index prioritizes one boundary when reconciling the others. Resizing changes the baseline, so the same offset does not guarantee the same absolute pane width.

Collapsed temporarily ignores offsets and hides drag areas while keeping content visible. It does not collapse a pane to zero. Hidden hides the grabber icon; HiddenCollapsed also removes separation. To disable user adjustment, set DraggingEnabled = false: programmatic SplitOffsets changes still work.

DragStarted/Dragged/DragEnded describe user dragging; ordinary offset assignments do not emit them. Dragged supplies the active boundary’s offset without its index: read SplitOffsets to save the entire layout. GetDragAreaControls returns internal Controls owned by the container: do not free or reparent them.

General container rules.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

SplitContainerConstructor
# SplitContainer
C#
public SplitContainer();

Creates a horizontal container: Collapsed = false, DraggingEnabled = true, initially SplitOffsets = [0]. Active divider count depends on eligible children after layout.

Properties12

CollapsedProperty
# Collapsed
C#
public bool Collapsed { get; set; }

Default false. true temporarily ignores offsets and hides drag areas; pane content remains visible. Stored offsets take effect again after false unless normalized while Collapsed.

DragAreaHighlightInEditorProperty
# DragAreaHighlightInEditor
C#
public bool DragAreaHighlightInEditor { get; set; }

Shows drag-area debugging only in the editor, default false. Does not enable highlighting in the running game or change pane sizes.

DragAreaMarginBeginProperty
# DragAreaMarginBegin
C#
public int DragAreaMarginBegin { get; set; }

Pixel drag-area inset from the starting edge along the divider; default 0. Top edge in a horizontal split; horizontal starting edge respecting RTL in a vertical split. Not a pane minimum size.

DragAreaMarginEndProperty
# DragAreaMarginEnd
C#
public int DragAreaMarginEnd { get; set; }

Pixel drag-area inset from the ending edge along the divider; default 0. Shortens the interaction area without changing SplitOffsets.

DragAreaOffsetProperty
# DragAreaOffset
C#
public int DragAreaOffset { get; set; }

Pixel shift of the drag area across the divider, default 0. Does not move the pane boundary; horizontal shift direction accounts for RTL.

DragNestedIntersectionsProperty
# DragNestedIntersections
C#
public bool DragNestedIntersections { get; set; }

Enables joint dragging at nested divider intersections, default false. Requires enabled, visible, uncollapsed SplitContainers with perpendicular axes and at least two panes. Does not link arbitrary sibling panes.

DraggerVisibilityProperty
# DraggerVisibility
C#
public SplitContainer.DraggerVisibilityEnum DraggerVisibility { get; set; }

Default Visible. Hidden hides the grabber icon but retains separation; HiddenCollapsed also removes separation. These modes do not replace DraggingEnabled = false and do not hide panes.

DraggingEnabledProperty
# DraggingEnabled
C#
public bool DraggingEnabled { get; set; }

Enables user adjustment, default true. false stops current dragging and makes the drag area ignore mouse input, but does not prevent programmatic SplitOffsets changes.

SplitOffsetProperty · Deprecated
# SplitOffset
C#
public int SplitOffset { get; set; }

Deprecated access to the first boundary offset only. Use SplitOffsets for multiple panes; this is not the first pane’s absolute width.

SplitOffsetsProperty
# SplitOffsets
C#
public int[] SplitOffsets { get; set; }

Pixel boundary offsets relative to baseline distribution. N panes require N − 1 offsets; assign after constructing children or wait for layout. int[] is copied on get/set. Visual position constraints do not normalize stored values; use ClampSplitOffset for that.

TouchDraggerEnabledProperty
# TouchDraggerEnabled
C#
public bool TouchDraggerEnabled { get; set; }

Enables separate touch grabbers, default false. Does not bypass Collapsed/DraggingEnabled. Also changes separation calculation: theme separation is used instead of the maximum with the ordinary icon size.

VerticalProperty
# Vertical
C#
public bool Vertical { get; set; }

false for horizontal panes, true for vertical panes. Mutable only on base SplitContainer. HSplitContainer/VSplitContainer reject every setter call.

Methods29

ClampSplitOffset2 overloads
# ClampSplitOffset · 1/2
C#
public void ClampSplitOffset();

Normalizes stored offsets against child constraints, prioritizing the selected boundary, then queues layout. Call after initial layout. No argument means priority 0. The index must exist; fewer than two panes cause no normalization.

# ClampSplitOffset · 2/2
C#
public void ClampSplitOffset(int priorityIndex = 0);

Normalizes stored offsets against child constraints, prioritizing the selected boundary, then queues layout. Call after initial layout. No argument means priority 0. The index must exist; fewer than two panes cause no normalization.

Parameters
NameTypeDefault
priorityIndexint0
priorityIndex

Existing zero-based boundary index; default 0. Selected boundary has priority when reconciling constraints.

GetDragAreaControlControl · Deprecated
# GetDragAreaControl
C#
public Control GetDragAreaControl();

Deprecated access to the first internal drag area only. Use GetDragAreaControls; the returned Control belongs to the container and can be hidden.

Returns Control

Shared first drag-area Control owned by the container.

GetDragAreaControlsReckfell.Collections.Array<Control>
# GetDragAreaControls
C#
public Reckfell.Collections.Array<Control> GetDragAreaControls();

Returns an array of internal drag-area Controls. These are shared references to container-owned children: do not Free/Dispose or reparent them. A hidden placeholder can exist even with fewer than two panes; Count is not the active boundary count.

Returns Reckfell.Collections.Array<Control>

A new array of shared references to internal Controls; the Controls remain container-owned.

GetDragAreaMarginBeginint
# GetDragAreaMarginBegin
C#
public int GetDragAreaMarginBegin();

Pixel drag-area inset from the starting edge along the divider; default 0. Top edge in a horizontal split; horizontal starting edge respecting RTL in a vertical split. Not a pane minimum size.

Returns int

Current stored setting.

GetDragAreaMarginEndint
# GetDragAreaMarginEnd
C#
public int GetDragAreaMarginEnd();

Pixel drag-area inset from the ending edge along the divider; default 0. Shortens the interaction area without changing SplitOffsets.

Returns int

Current stored setting.

GetDragAreaOffsetint
# GetDragAreaOffset
C#
public int GetDragAreaOffset();

Pixel shift of the drag area across the divider, default 0. Does not move the pane boundary; horizontal shift direction accounts for RTL.

Returns int

Current stored setting.

GetDraggerVisibilitySplitContainer.DraggerVisibilityEnum
# GetDraggerVisibility
C#
public SplitContainer.DraggerVisibilityEnum GetDraggerVisibility();

Default Visible. Hidden hides the grabber icon but retains separation; HiddenCollapsed also removes separation. These modes do not replace DraggingEnabled = false and do not hide panes.

Returns SplitContainer.DraggerVisibilityEnum

Current stored setting.

GetSplitOffsetint
# GetSplitOffset
C#
public int GetSplitOffset();

Deprecated access to the first boundary offset only. Use SplitOffsets for multiple panes; this is not the first pane’s absolute width.

Returns int

Stored offset of the first boundary only, not a guaranteed visual coordinate.

GetSplitOffsetsint[]
# GetSplitOffsets
C#
public int[] GetSplitOffsets();

Pixel boundary offsets relative to baseline distribution. N panes require N − 1 offsets; assign after constructing children or wait for layout. int[] is copied on get/set. Visual position constraints do not normalize stored values; use ClampSplitOffset for that.

Returns int[]

A copy of the offsets. Edit and assign back to apply changes.

IsCollapsedbool
# IsCollapsed
C#
public bool IsCollapsed();

Default false. true temporarily ignores offsets and hides drag areas; pane content remains visible. Stored offsets take effect again after false unless normalized while Collapsed.

Returns bool

Current stored setting.

IsDragAreaHighlightInEditorEnabledbool
# IsDragAreaHighlightInEditorEnabled
C#
public bool IsDragAreaHighlightInEditorEnabled();

Shows drag-area debugging only in the editor, default false. Does not enable highlighting in the running game or change pane sizes.

Returns bool

Current stored setting.

IsDraggingEnabledbool
# IsDraggingEnabled
C#
public bool IsDraggingEnabled();

Enables user adjustment, default true. false stops current dragging and makes the drag area ignore mouse input, but does not prevent programmatic SplitOffsets changes.

Returns bool

Current stored setting.

IsDraggingNestedIntersectionsbool
# IsDraggingNestedIntersections
C#
public bool IsDraggingNestedIntersections();

Enables joint dragging at nested divider intersections, default false. Requires enabled, visible, uncollapsed SplitContainers with perpendicular axes and at least two panes. Does not link arbitrary sibling panes.

Returns bool

Current stored setting.

IsTouchDraggerEnabledbool
# IsTouchDraggerEnabled
C#
public bool IsTouchDraggerEnabled();

Enables separate touch grabbers, default false. Does not bypass Collapsed/DraggingEnabled. Also changes separation calculation: theme separation is used instead of the maximum with the ordinary icon size.

Returns bool

Current stored setting.

IsVerticalbool
# IsVertical
C#
public bool IsVertical();

false for horizontal panes, true for vertical panes. Mutable only on base SplitContainer. HSplitContainer/VSplitContainer reject every setter call.

Returns bool

Current stored setting.

SetCollapsedvoid
# SetCollapsed
C#
public void SetCollapsed(bool collapsed);

Default false. true temporarily ignores offsets and hides drag areas; pane content remains visible. Stored offsets take effect again after false unless normalized while Collapsed.

Parameters
NameTypeDefault
collapsedbool—
collapsed

Default false. true temporarily ignores offsets and hides drag areas; pane content remains visible. Stored offsets take effect again after false unless normalized while Collapsed.

SetDragAreaHighlightInEditorvoid
# SetDragAreaHighlightInEditor
C#
public void SetDragAreaHighlightInEditor(bool dragAreaHighlightInEditor);

Shows drag-area debugging only in the editor, default false. Does not enable highlighting in the running game or change pane sizes.

Parameters
NameTypeDefault
dragAreaHighlightInEditorbool—
dragAreaHighlightInEditor

Shows drag-area debugging only in the editor, default false. Does not enable highlighting in the running game or change pane sizes.

SetDragAreaMarginBeginvoid
# SetDragAreaMarginBegin
C#
public void SetDragAreaMarginBegin(int margin);

Pixel drag-area inset from the starting edge along the divider; default 0. Top edge in a horizontal split; horizontal starting edge respecting RTL in a vertical split. Not a pane minimum size.

Parameters
NameTypeDefault
marginint—
margin

Pixel drag-area inset from the starting edge along the divider; default 0. Top edge in a horizontal split; horizontal starting edge respecting RTL in a vertical split. Not a pane minimum size.

SetDragAreaMarginEndvoid
# SetDragAreaMarginEnd
C#
public void SetDragAreaMarginEnd(int margin);

Pixel drag-area inset from the ending edge along the divider; default 0. Shortens the interaction area without changing SplitOffsets.

Parameters
NameTypeDefault
marginint—
margin

Pixel drag-area inset from the ending edge along the divider; default 0. Shortens the interaction area without changing SplitOffsets.

SetDragAreaOffsetvoid
# SetDragAreaOffset
C#
public void SetDragAreaOffset(int offset);

Pixel shift of the drag area across the divider, default 0. Does not move the pane boundary; horizontal shift direction accounts for RTL.

Parameters
NameTypeDefault
offsetint—
offset

Pixel shift of the drag area across the divider, default 0. Does not move the pane boundary; horizontal shift direction accounts for RTL.

SetDragNestedIntersectionsvoid
# SetDragNestedIntersections
C#
public void SetDragNestedIntersections(bool enabled);

Enables joint dragging at nested divider intersections, default false. Requires enabled, visible, uncollapsed SplitContainers with perpendicular axes and at least two panes. Does not link arbitrary sibling panes.

Parameters
NameTypeDefault
enabledbool—
enabled

Enables joint dragging at nested divider intersections, default false. Requires enabled, visible, uncollapsed SplitContainers with perpendicular axes and at least two panes. Does not link arbitrary sibling panes.

SetDraggerVisibilityvoid
# SetDraggerVisibility
C#
public void SetDraggerVisibility(SplitContainer.DraggerVisibilityEnum mode);

Default Visible. Hidden hides the grabber icon but retains separation; HiddenCollapsed also removes separation. These modes do not replace DraggingEnabled = false and do not hide panes.

Parameters
NameTypeDefault
modeSplitContainer.DraggerVisibilityEnum—
mode

Default Visible. Hidden hides the grabber icon but retains separation; HiddenCollapsed also removes separation. These modes do not replace DraggingEnabled = false and do not hide panes.

SetDraggingEnabledvoid
# SetDraggingEnabled
C#
public void SetDraggingEnabled(bool draggingEnabled);

Enables user adjustment, default true. false stops current dragging and makes the drag area ignore mouse input, but does not prevent programmatic SplitOffsets changes.

Parameters
NameTypeDefault
draggingEnabledbool—
draggingEnabled

Enables user adjustment, default true. false stops current dragging and makes the drag area ignore mouse input, but does not prevent programmatic SplitOffsets changes.

SetSplitOffsetvoid
# SetSplitOffset
C#
public void SetSplitOffset(int offset);

Deprecated access to the first boundary offset only. Use SplitOffsets for multiple panes; this is not the first pane’s absolute width.

Parameters
NameTypeDefault
offsetint—
offset

First boundary offset only, in pixels relative to baseline distribution.

SetSplitOffsets2 overloads
# SetSplitOffsets · 1/2
C#
public void SetSplitOffsets(int[] offsets);

Pixel boundary offsets relative to baseline distribution. N panes require N − 1 offsets; assign after constructing children or wait for layout. int[] is copied on get/set. Visual position constraints do not normalize stored values; use ClampSplitOffset for that.

Parameters
NameTypeDefault
offsetsint[]—
offsets

Pixel boundary offsets relative to baseline distribution, in pane order. Data is copied.

# SetSplitOffsets · 2/2
C#
public void SetSplitOffsets(ReadOnlySpan<int> offsets);

Pixel boundary offsets relative to baseline distribution. N panes require N − 1 offsets; assign after constructing children or wait for layout. int[] is copied on get/set. Visual position constraints do not normalize stored values; use ClampSplitOffset for that.

Parameters
NameTypeDefault
offsetsReadOnlySpan<int>—
offsets

Pixel boundary offsets relative to baseline distribution, in pane order. Data is copied.

SetTouchDraggerEnabledvoid
# SetTouchDraggerEnabled
C#
public void SetTouchDraggerEnabled(bool enabled);

Enables separate touch grabbers, default false. Does not bypass Collapsed/DraggingEnabled. Also changes separation calculation: theme separation is used instead of the maximum with the ordinary icon size.

Parameters
NameTypeDefault
enabledbool—
enabled

Enables separate touch grabbers, default false. Does not bypass Collapsed/DraggingEnabled. Also changes separation calculation: theme separation is used instead of the maximum with the ordinary icon size.

SetVerticalvoid
# SetVertical
C#
public void SetVertical(bool vertical);

false for horizontal panes, true for vertical panes. Mutable only on base SplitContainer. HSplitContainer/VSplitContainer reject every setter call.

Parameters
NameTypeDefault
verticalbool—
vertical

false for horizontal panes, true for vertical panes. Mutable only on base SplitContainer. HSplitContainer/VSplitContainer reject every setter call.

Signals and events3

DragEndedEvent
# DragEnded
C#
public event Action DragEnded;

End or interruption of active user dragging. Ordinary programmatic offset changes without active dragging do not emit this signal.

DragStartedEvent
# DragStarted
C#
public event Action DragStarted;

Beginning of user divider dragging. Programmatic SplitOffsets assignment does not emit this signal. No boundary index is supplied.

DraggedEvent
# Dragged
C#
public event SplitContainer.DraggedEventHandler Dragged;

User moved a divider: offset is the active boundary’s stored offset from baseline distribution, not pointer coordinates. No index is supplied; read SplitOffsets for full state. Ordinary programmatic assignment does not emit this signal.

Handler parameters
NameTypeDefault
offsetlong—
offset

Active boundary offset from baseline distribution; long in the C# event. Does not include the boundary index.

SplitContainer.DraggerVisibilityEnum

ValueDescription
Hidden = 1

The split dragger icon is never visible regardless of the value of SplitContainer.autohide. The size of the grabber icon determines the minimum SplitContainer.separation.

HiddenCollapsed = 2

The split dragger icon is not visible, and the split bar is collapsed to zero thickness.

Visible = 0

The split dragger icon is always visible when SplitContainer.autohide is false, otherwise visible only when the cursor hovers it. The size of the grabber icon determines the minimum SplitContainer.separation. The dragger icon is automatically hidden if the length of the grabber icon is longer than the split bar.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
touch_dragger_color
Color

The color of the touch dragger.

Default: Color(1, 1, 1, 0.3)
touch_dragger_hover_color
Color

The color of the touch dragger when hovered.

Default: Color(1, 1, 1, 0.6)
touch_dragger_pressed_color
Color

The color of the touch dragger when pressed.

Default: Color(1, 1, 1, 1)
autohide
int

Boolean value. If 1 (true), the grabbers will hide automatically when they aren't under the cursor. If 0 (false), the grabbers are always visible. The SplitContainer.DraggerVisibility must be SplitContainer.DraggerVisibilityEnum.Visible.

Default: 1
minimum_grab_thickness
int

The minimum thickness of the area users can click on to grab a split bar. This ensures that the split bar can still be dragged if SplitContainer.separation or SplitContainer.h_grabber / SplitContainer.v_grabber's size is too narrow to easily select.

Default: 6
separation
int

The split bar thickness, i.e., the gap between each child of the container. This is overridden by the size of the grabber icon if SplitContainer.DraggerVisibility is set to SplitContainer.DraggerVisibilityEnum.Visible, or SplitContainer.DraggerVisibilityEnum.Hidden, and SplitContainer.separation is smaller than the size of the grabber icon in the same axis. Note: To obtain SplitContainer.separation values less than the size of the grabber icon, for example a 1 px hairline, set SplitContainer.h_grabber or SplitContainer.v_grabber to a new ImageTexture, which effectively sets the grabber icon size to 0 px.

Default: 12
grabber
Texture2D

The icon used for the grabbers drawn in the separations. This is only used in HSplitContainer and VSplitContainer. For SplitContainer, see SplitContainer.h_grabber and SplitContainer.v_grabber instead.

h_grabber
Texture2D

The icon used for the grabbers drawn in the separations when SplitContainer.Vertical is false.

h_touch_dragger
Texture2D

The icon used for the drag handle when SplitContainer.TouchDraggerEnabled is true and SplitContainer.Vertical is false.

touch_dragger
Texture2D

The icon used for the drag handle when SplitContainer.TouchDraggerEnabled is true. This is only used in HSplitContainer and VSplitContainer. For SplitContainer, see SplitContainer.h_touch_dragger and SplitContainer.v_touch_dragger instead.

v_grabber
Texture2D

The icon used for the grabbers drawn in the separations when SplitContainer.Vertical is true.

v_touch_dragger
Texture2D

The icon used for the drag handle when SplitContainer.TouchDraggerEnabled is true and SplitContainer.Vertical is true.

split_bar_background
StyleBox

Determines the background of the split bar if its thickness is greater than zero.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.