-
Notifications
You must be signed in to change notification settings - Fork 0
Spacer
Wire name spacer
Empty space. It draws nothing and exists to push other things apart.
new panel layout=hbox children={
new button caption="Help"
new spacer stretch=1
new button caption="OK"
new button caption="Cancel"
}
That row puts Help at the left and the other two at the right, because the spacer takes every unit the row has left over.
| Property | Type | Default | Meaning |
|---|---|---|---|
height |
int | — | Explicit spacer height in units |
width |
int | — | Explicit spacer width in units |
Plus the common properties.
width and height give a spacer a fixed size in
units. stretch makes it elastic instead, taking
whatever the row or column has left over. A spacer with neither takes its
minimum and pushes nothing.
spacer emits no events.
Both make gaps, and they are for different jobs.
| Use | |
|---|---|
spacing on the panel |
An even gap between every child. |
spacer with width/height
|
One gap of a known size, in one place. |
spacer with stretch
|
One elastic gap that absorbs the leftover room. |
Reach for spacing first — a row that needs a spacer between every pair of
controls is a row that wanted spacing.
Panel — spacing, layout ·
Common Properties — stretch ·
Separator
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