On Thu, Nov 09, 2006 at 01:23:22PM -0800, Mark Richardson wrote: > Having some difficulty with a combo box and associated tree store. When I do > this, nothing shows up... > > GtkTreeStore *myTreeStore=gtk_tree_store_new(1, G_TYPE_STRING); > GtkWidget *myComboBox=lookup_widget(mainWindow, "myComboBox"); > gtk_combo_box_set_model(GTK_COMBO_BOX(myComboBox), > GTK_TREE_MODEL(myTreeStore)); > > GtkTreeIter tempIter; > gtk_tree_model_get_iter(GTK_TREE_MODEL(myTreeStore), &tempIter); > gtk_tree_store_append(myTreeStore, &iter, NULL); > gtk_tree_store_set(myTreeStore, &iter, 0, "test", -1); > > I ultimately want to make more than 1 column, and I need to change the tree > store data on the fly. So I would like to use the treeStore instead of the > default combo box new_text and append_text.
If you want to use your own model, you have also to set up the view using the GtkCellView interface -- exactly as you would do with a GtkTreeViewColumn. No cell renderers set up => nothing is displayed. Yeti -- Whatever. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list