Skip to content

Splitter

phroun edited this page Aug 22, 2026 · 1 revision

Wire name splitter

Two panes with a divider the user can drag.

s=new splitter orientation=horizontal position=0.3 children={
	new listview children={ new item caption="Alpha" }
	new panel layout=vbox children={ new label caption="Details" }
}

Properties

Property Type Default Meaning
caption string Optional divider title.
orientation horizontal | vertical Split direction.
position float Divider ratio (0.0-1.0).

Plus the common properties.

Events

splitter emits no events.

Dragging the divider does not raise an event. The split is presentation, and the panes keep their own state.

Exactly two panes

The first two children become the panes, in order. A third is an error:

new splitter children={ new label caption="a"; new label caption="b"; new label caption="c" }
  ->  splitter: already has two panes

Nesting splitters gives three or more regions: put a splitter in a pane of another splitter.

Orientation

The default is vertical, which stacks the panes and gives a divider that moves up and down. horizontal puts them side by side.

The name describes the split, not the divider — orientation=horizontal means the panes sit horizontally from each other.

Position

position is a ratio from 0.0 to 1.0 giving the first pane's share, and defaults to 0.5. Values outside the range are clamped rather than refused:

new splitter position=1.5 children={new label caption="a"; new label caption="b"}
  ->  position = 1

new splitter position=-0.5 children={new label caption="a"; new label caption="b"}
  ->  position = 0

caption puts a title in the divider.

Keys and mouse

Does
Drag the divider Move the split; the grab point is preserved within the divider band.
Left Right / Up Down Move the divider, when it has focus.

The splitter takes focus by Tab and by click.

See also

Panel · ScrollArea · MDIPane · Common Properties

Clone this wiki locally