-
Notifications
You must be signed in to change notification settings - Fork 0
Splitter
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" }
}
| 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.
splitter emits no events.
Dragging the divider does not raise an event. The split is presentation, and the panes keep their own state.
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.
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 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.
| 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.
KittyTK — image/tty Trinket Kit · MIT licensed · alpha, 0.1.x
Repository · Issues · Support on ko-fi
Sibling projects: PurfecTerm (terminal emulator) · mew (text editor) · PawScript (language)
Getting Started
Installation Building from Source Running a Display Host Your First Application Examples
Protocol
Protocol Overview Object Model Properties and Values Events Templates and Aliases Common Properties Introspection Transports and Security
Clients
Go Client Python Client C Client
Application Objects
Application · MenuBar · Window · MessageBox
Output Trinkets
Label · ProgressBar · StatusBar
Input Trinkets
TextInput · Editor · Terminal
Button · CheckBox · RadioButton
ListView · ComboBox · TreeView
Layout Trinkets
TabTrinket · Panel
ScrollArea · MDIPane
Separator · Spacer · Splitter
Other Trinkets
Layout Helpers