Switch
Object Hierarchy:
Description:
[ CCode ( type_id = "gtk_switch_get_type ()" ) ]
public class Switch : Widget, Accessible, Actionable, Buildable, ConstraintTarget
public class Switch : Widget, Accessible, Actionable, Buildable, ConstraintTarget
Switch is a widget that has two states: on or off.
The user can control which state should be active by clicking the empty area, or by dragging the handle.
GtkSwitch can also handle situations where the underlying state changes with a delay. See state_set for details.
CSS nodes
switch
├── label
├── label
╰── slider
ur css nodes, the main node with
the name switch and subnodes for the slider and the on and off labels. Neither of them is using any style classes.
Accessibility
GtkSwitch uses the SWITCH role.
Namespace: Gtk
Package: gtk4
Content:
Properties:
Creation methods:
Methods:
Signals:
Inherited Members:
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Accessible
All known members inherited from interface Gtk.Actionable
All known members inherited from interface Gtk.Buildable