Re: Gtk::combo problems



I make a dialog for my application with a combo. Then I have a list
of values that I want to show to the user but I do not know how to do
this.

See this example,
Carlos

-------------------------------
GList *glist = NULL;

combo = gtk_combo_new ();
gtk_widget_set_usize (GTK_WIDGET (combo), 60, 0);
gtk_box_pack_start (GTK_BOX (vbox1), combo, FALSE, FALSE, 0);
gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), "1.0");
glist = g_list_append (glist, "1.0");
glist = g_list_append (glist, "1.5");
glist = g_list_append (glist, "2.0");
glist = g_list_append (glist, "3.0");
gtk_combo_set_popdown_strings (GTK_COMBO (combo), glist);
gtk_object_set_data (GTK_OBJECT (dialog), "combo_box_order", combo);
gtk_widget_show (combo);




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]