Top | ![]() |
![]() |
![]() |
![]() |
gboolean | active | Read / Write |
GtkCheckButton * | group | Write |
gboolean | inconsistent | Read / Write |
char * | label | Read / Write |
gboolean | use-underline | Read / Write |
GtkCheckButton implements GtkAccessible, GtkBuildable, GtkConstraintTarget and GtkActionable.
A GtkCheckButton places a label next to an indicator.
1 2 3 |
checkbutton[.text-button] ├── check ╰── [label] |
A GtkCheckButton has a main node with name checkbutton. If the “label” property is set, it contains a label child. The indicator node is named check when no group is set, and radio if the checkbutton is grouped together with other checkbuttons.
GtkWidget *
gtk_check_button_new_with_label (const char *label
);
Creates a new GtkCheckButton with a GtkLabel next to it, if
label
is non-NULL
.
GtkWidget *
gtk_check_button_new_with_mnemonic (const char *label
);
Creates a new GtkCheckButton containing a label. Underscores
in label
indicate the mnemonic for the check button.
gboolean
gtk_check_button_get_inconsistent (GtkCheckButton *check_button
);
Returns whether the check button is in an inconsistent state.
void gtk_check_button_set_inconsistent (GtkCheckButton *check_button
,gboolean inconsistent
);
If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a check button, and the current values in that range are inconsistent, you may want to display the toggle in an "in between" state. Normally you would turn off the inconsistent state again if the user checks the check button. This has to be done manually, gtk_check_button_set_inconsistent only affects visual appearance, not the semantics of the button.
“active”
property “active” gboolean
If the toggle button should be pressed in.
Owner: GtkCheckButton
Flags: Read / Write
Default value: FALSE
“group”
property“group” GtkCheckButton *
The check button whose group this widget belongs to.
Owner: GtkCheckButton
Flags: Write
“inconsistent”
property “inconsistent” gboolean
If the check button is in an “in between” state.
Owner: GtkCheckButton
Flags: Read / Write
Default value: FALSE
“label”
property “label” char *
Text of the label widget inside the button, if the button contains a label widget.
Owner: GtkCheckButton
Flags: Read / Write
Default value: NULL
“toggled”
signalvoid user_function (GtkCheckButton *checkbutton, gpointer user_data)
Emitted when the buttons's “active” flag changes.
Flags: Run First