GtkSpinButton

A numeric input with increment/decrement buttons.

Preview

CSS Node Tree

spinbutton[.horizontal|.vertical]
  ├── text
  ├── button.down
  └── button.up

Props

Prop

Type

Keyboard

  • Arrow Up/Down — increment/decrement by step
  • Page Up/Down — increment/decrement by page step
  • Ctrl+Home / Ctrl+End, Ctrl+Page Down / Ctrl+Page Up — jump to min / max
  • Enter — commit the typed value

Typed text is committed on Enter, when the focus leaves, and before any spin. The scroll wheel spins by a step. Middle-clicking a button spins by a page; right-clicking it jumps to the bound.

GTK4 Documentation →

On this page