Matt23488

Gtk Combo Box

Jun 2nd, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. GtkWidget *resolutionComboBox;
  2. GtkListStore *list_store;
  3. GtkTreeIter iter;
  4.  
  5. list_store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
  6. gtk_list_store_append (list_store, &iter);
  7. gtk_list_store_set (list_store, &iter, 0, "612 X 512", 1, 612, 2, 512, -1);
  8. gtk_list_store_append (list_store, &iter);
  9. gtk_list_store_set (list_store, &iter, 0, "1224 X 1024", 1, 1224, 2, 1024, -1);
  10.  
  11. resolutionComboBox = gtk_combo_box_new_with_model (GTK_TREE_MODEL (list_store));
  12.  
  13. g_object_unref (list_store);
Advertisement
Add Comment
Please, Sign In to add comment