public class Splitter extends Container:
Two-pane resizable container.
A splitter lays out a first and second widget separated by a draggable handle. The handle position is exposed as a percentage through ratio, while the internal drag precision remains finer to keep resizing smooth. The native backend automatically displays the matching horizontal or vertical resize cursor while the pointer is over the handle. Setting either pane's isManaged property to false collapses that pane; the remaining pane then fills the splitter and the handle is disabled.
left = TreeView() right = TabWidget() splitter = Splitter(Splitter.HORIZONTAL, left, right) splitter.ratio = 30 right.isManaged = false splitter.applyLayout() # left now occupies the complete splitter
| Modifier and Type | Member | Description |
|---|---|---|
| public static readonly | HORIZONTALHORIZONTAL as String = "horizontal" |
Horizontal splitter: panes are arranged left/right. |
| public static readonly | VERTICALVERTICAL as String = "vertical" |
Vertical splitter: panes are arranged top/bottom. |
| Modifier and Type | Member | Description |
|---|---|---|
| public property | handleSizehandleSize as Int = 8 |
Draggable handle thickness in pixels. |
| public property | minimumFirstPaneSizeminimumFirstPaneSize as Int = 220 |
Minimum size kept for the first pane while dragging. |
| public property | minimumSecondPaneSizeminimumSecondPaneSize as Int = 520 |
Minimum size kept for the second pane while dragging. |
| public property | orientationorientation as String |
Split orientation, horizontal or vertical. |
| public property | ratioratio as Int: |
Approximate first-pane percentage, clamped between 15 and 85. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | Splitter | Creates a splitter with optional initial panes. |
| Modifier and Type | Member | Description |
|---|---|---|
| public override | applyLayoutapplyLayout(recursive as Boolean = true) as Void: |
No summary. |
| public | beginDragAt | Starts dragging the splitter handle when the pointer is over it. |
| public | dragTo | Moves the splitter handle during an active drag. |
| public | endDragendDrag() as Void: |
Ends the current splitter drag. |
| public override | paintpaint(painter as Painter) as Void: |
No summary. |
| public override | paintOverlaypaintOverlay(painter as Painter) as Void: |
No summary. |
| public override | setBounds | No summary. |
| public | setFirstsetFirst(widget as Widget) as Void: |
Replaces the first pane. |
| public | setSecondsetSecond(widget as Widget) as Void: |
Replaces the second pane. |