GtkCheckButton

A checkbox or radio button widget.

Preview

CSS Node Tree

checkbutton[.text-button][.grouped]
  ├── check (or radio if grouped)
  └── [label]

Props

Prop

Type

Behavior

  • Without a group prop, renders as a checkbox.
  • With a group prop, buttons sharing the same group act as radio buttons — activating one deactivates the others, and an active radio stays active when clicked. Tab enters the group at its active button, and the arrow keys move to and activate the next button in their direction.
  • Space or Enter activates the focused button.
  • inconsistent shows a dash instead of the check mark. Like GTK, the button doesn't clear it when clicked: turn it off in onToggled.
  • disabled makes the button insensitive: dimmed, not focusable, and it ignores clicks and keys.

GTK4 Documentation →

On this page