Method

GtkComboBoxset_active_id

deprecated: 4.10 

Declaration [src]

gboolean
gtk_combo_box_set_active_id (
  GtkComboBox* combo_box,
  const char* active_id
)

Description [src]

Changes the active row of combo_box to the one that has an ID equal to active_id.

If active_id is NULL, the active row is unset. Rows having a NULL ID string cannot be made active by this function.

If the GtkComboBox:id-column property of combo_box is unset or if no row has the given ID then the function does nothing and returns FALSE.

Deprecated since: 4.10

Use GtkDropDown.

Sets propertyGtk.ComboBox:active-id

Parameters

active_id

Type: const char*

The ID of the row to select.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.

Return value

Type: gboolean

TRUE if a row with a matching ID was found. If a NULL active_id was given to unset the active row, the function always returns TRUE.