All pastes #3261 Raw Edit

Anonymous

public c v1 · immutable
#3261 ·published 2004-12-21 22:38 UTC
rendered paste body
//compile with: gcc combo_test.c -o ct `pkg-config --cflags --libs gtk+-2.0` && ./ct#include <gtk/gtk.h>int main(int argc, char *argv[]){  GtkWidget *window, *type_pdown;  GtkListStore *list_store;  GtkTreeIter iter;  gtk_init (&argc, &argv);  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);    list_store = gtk_list_store_new(1, G_TYPE_STRING);  gtk_list_store_append (list_store, &iter);  gtk_list_store_set(list_store, &iter, 0, "Foo", -1);  type_pdown = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list_store));  gtk_container_add(GTK_CONTAINER(window), type_pdown);  gtk_widget_show(type_pdown);  gtk_widget_show(window);  gtk_main();  return 0;}