Hi all, I also needed the liststore implementation of a Combo for a different reason (I could not find a way to to make the simple Combo tell me the number of items currently in the list. With a list store implementation this is simply n = gtk_tree_model_iter_n_children ( (GtkTreeModel *)store , NULL );). I confirm what Tadej was mentioning... After moving the data into the liststore the following work for setting the active selection: GtkTreeIter iter ; char pathstring [ 20 ] ; sprintf ( pathstring , "%d" , selix ) ; gtk_tree_model_get_iter_from_string ((GtkTreeModel *)store, &iter, pathstring); gtk_combo_box_set_active_iter ((GtkComboBox *)c, &iter ) ; This works too: gtk_combo_box_set_active ((GtkComboBox *)c, selix ) ; Ken --- On Fri, 25/6/10, Tadej Borovšak <tadeboro gmail com> wrote:
|