SplitContainer
Panes with user-adjustable boundaries.
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.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
SplitContainerConstructor
public SplitContainer();Creates a horizontal container: Collapsed = false, DraggingEnabled = true, initially SplitOffsets = [0]. Active divider count depends on eligible children after layout.
Properties12
CollapsedProperty
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
| Name | Type | Default |
|---|---|---|
priorityIndex | int | 0 |
priorityIndexExisting zero-based boundary index; default 0. Selected boundary has priority when reconciling constraints.
GetDragAreaControlControl · Deprecated
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.
ControlShared first drag-area Control owned by the container.
GetDragAreaControlsReckfell.Collections.Array<Control>
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.
Reckfell.Collections.Array<Control>A new array of shared references to internal Controls; the Controls remain container-owned.
GetDragAreaMarginBeginint
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.
intCurrent stored setting.
GetDragAreaMarginEndint
public int GetDragAreaMarginEnd();Pixel drag-area inset from the ending edge along the divider; default 0. Shortens the interaction area without changing SplitOffsets.
intCurrent stored setting.
GetDragAreaOffsetint
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.
intCurrent stored setting.
GetDraggerVisibilitySplitContainer.DraggerVisibilityEnum
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.
SplitContainer.DraggerVisibilityEnumCurrent stored setting.
GetSplitOffsetint
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.
intStored offset of the first boundary only, not a guaranteed visual coordinate.
GetSplitOffsetsint[]
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.
int[]A copy of the offsets. Edit and assign back to apply changes.
IsCollapsedbool
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.
boolCurrent stored setting.
IsDragAreaHighlightInEditorEnabledbool
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.
boolCurrent stored setting.
IsDraggingEnabledbool
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.
boolCurrent stored setting.
IsDraggingNestedIntersectionsbool
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.
boolCurrent stored setting.
IsTouchDraggerEnabledbool
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.
boolCurrent stored setting.
IsVerticalbool
public bool IsVertical();false for horizontal panes, true for vertical panes. Mutable only on base SplitContainer. HSplitContainer/VSplitContainer reject every setter call.
boolCurrent stored setting.
SetCollapsedvoid
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.
| Name | Type | Default |
|---|---|---|
collapsed | bool | — |
collapsedDefault 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
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.
| Name | Type | Default |
|---|---|---|
dragAreaHighlightInEditor | bool | — |
dragAreaHighlightInEditorShows drag-area debugging only in the editor, default false. Does not enable highlighting in the running game or change pane sizes.
SetDragAreaMarginBeginvoid
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.
| Name | Type | Default |
|---|---|---|
margin | int | — |
marginPixel 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
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.
| Name | Type | Default |
|---|---|---|
margin | int | — |
marginPixel drag-area inset from the ending edge along the divider; default 0. Shortens the interaction area without changing SplitOffsets.
SetDragAreaOffsetvoid
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.
| Name | Type | Default |
|---|---|---|
offset | int | — |
offsetPixel shift of the drag area across the divider, default 0. Does not move the pane boundary; horizontal shift direction accounts for RTL.
SetDragNestedIntersectionsvoid
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.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnables 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
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.
| Name | Type | Default |
|---|---|---|
mode | SplitContainer.DraggerVisibilityEnum | — |
modeDefault 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
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.
| Name | Type | Default |
|---|---|---|
draggingEnabled | bool | — |
draggingEnabledEnables user adjustment, default true. false stops current dragging and makes the drag area ignore mouse input, but does not prevent programmatic SplitOffsets changes.
SetSplitOffsetvoid
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.
| Name | Type | Default |
|---|---|---|
offset | int | — |
offsetFirst boundary offset only, in pixels relative to baseline distribution.
SetSplitOffsets2 overloads
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.
| Name | Type | Default |
|---|---|---|
offsets | int[] | — |
offsetsPixel boundary offsets relative to baseline distribution, in pane order. Data is copied.
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.
| Name | Type | Default |
|---|---|---|
offsets | ReadOnlySpan<int> | — |
offsetsPixel boundary offsets relative to baseline distribution, in pane order. Data is copied.
SetTouchDraggerEnabledvoid
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.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnables 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
public void SetVertical(bool vertical);false for horizontal panes, true for vertical panes. Mutable only on base SplitContainer. HSplitContainer/VSplitContainer reject every setter call.
| Name | Type | Default |
|---|---|---|
vertical | bool | — |
verticalfalse for horizontal panes, true for vertical panes. Mutable only on base SplitContainer. HSplitContainer/VSplitContainer reject every setter call.
Signals and events3
DragEndedEvent
public event Action DragEnded;End or interruption of active user dragging. Ordinary programmatic offset changes without active dragging do not emit this signal.
DragStartedEvent
public event Action DragStarted;Beginning of user divider dragging. Programmatic SplitOffsets assignment does not emit this signal. No boundary index is supplied.
DraggedEvent
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.
| Name | Type | Default |
|---|---|---|
offset | long | — |
offsetActive boundary offset from baseline distribution; long in the C# event. Does not include the boundary index.
SplitContainer.DraggerVisibilityEnum
| Value | Description |
|---|---|
Visible = 0 | The split dragger icon is always visible when |
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 type | Description |
|---|---|
touch_dragger_colorColor | The color of the touch dragger. Default:Color(1, 1, 1, 0.3) |
touch_dragger_hover_colorColor | The color of the touch dragger when hovered. Default:Color(1, 1, 1, 0.6) |
touch_dragger_pressed_colorColor | The color of the touch dragger when pressed. Default:Color(1, 1, 1, 1) |
autohideint | Boolean value. If 1 |
minimum_grab_thicknessint | 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 6 |
separationint | 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 12 |
grabberTexture2D | The icon used for the grabbers drawn in the separations. This is only used in |
h_grabberTexture2D | The icon used for the grabbers drawn in the separations when |
h_touch_draggerTexture2D | The icon used for the drag handle when |
touch_draggerTexture2D | The icon used for the drag handle when |
v_grabberTexture2D | The icon used for the grabbers drawn in the separations when |
v_touch_draggerTexture2D | The icon used for the drag handle when |
split_bar_backgroundStyleBox | Determines the background of the split bar if its thickness is greater than zero. |